KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > org > w3c > dom > CharacterData

org.w3c.dom
Interface CharacterData

All Superinterfaces:
Node
All Known Subinterfaces:
CDATASection, Comment, Text
See Also:
Top Examples, Source Code

void appendData(String arg)
                throws DOMException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


void deleteData(int offset,
                int count)
                throws DOMException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


String getData()
               throws DOMException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1584]Get the DOM TEXT element data
By Anonymous on 2005/11/04 20:23:08  Rate
//Get the TEXT element data 
  
  
 Element e = ... //From somewhere 
  
  
 // get the enclosing document node 
 NodeList nl = e.getOwnerDocument (  ) .getElementsByTagName ( "aTag" ) ; 
  
  
 for  ( int i = 0; i  <  nl.getLength (  ) ; i++ )   {  
   Node aChild = nl.item ( i ) .getFirstChild (  ) ; 
   Text aText =  ( Text )  aChild; 
   String theData = aText.getData (  ) ; 
    
   //do something with data 
  
  
  } 


int getLength()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


void insertData(int offset,
                String arg)
                throws DOMException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


void replaceData(int offset,
                 int count,
                 String arg)
                 throws DOMException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


void setData(String data)
             throws DOMException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


String substringData(int offset,
                     int count)
                     throws DOMException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags