|
Subject: [xsl] Using Java for DOM processing From: "Chisanga Mwelwa" <sangz2000@xxxxxxxxxxx> Date: Tue, 13 Apr 2004 14:26:10 +0000 |
Java code snippet >>> ... System.out.print( "Here is the document's root node:" ); System.out.println( " " + root.getNodeName() );
System.out.println( "Here are its child elements: " );
NodeList childNodes = root.getChildNodes();
Node currentNode;
... // print node name of each child element
System.out.println( currentNode.getNodeName());
}
...Here is the document's root node: article Here are its child elements: title date author summary content The first child of root node is: title whose next sibling is: date value of date element is: April 13, 2004 Parent node of date is: article
Here is the document's root node: article Here are its child elements: #text title #text date #text author #text summary #text content #text The first child of root node is: #text whose next sibling is: title value of title element is: Simple XML Parent node of title is: article
_________________________________________________________________ Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] XSLT research, Jerome Sadler | Thread | RE: [xsl] Using Java for DOM proces, Gertjan Assies |
| [xsl] XSLT research, Jerome Sadler | Date | RE: [xsl] Using Java for DOM proces, Gertjan Assies |
| Month |