hi all,
I've got a very very slight grasp of the javax.xml.* and org.w3c.dom.* libraries, and from some tutorials and books I've been able to parse simple xml documents.
But I need to parse a complex xml document, and I have no idea how to go about it. The document looks like this:
And I have no idea how to go about getting the individual "site" nodes. Suggestions would be greatly appreciated, code samples always welcome
TIA
leo
I've got a very very slight grasp of the javax.xml.* and org.w3c.dom.* libraries, and from some tutorials and books I've been able to parse simple xml documents.
But I need to parse a complex xml document, and I have no idea how to go about it. The document looks like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE user SYSTEM "XMLStore.dtd" >
<user>
<userid>1</userid>
<name>leo</name>
<email>myemailaddress@domain.com</email>
<lang>en</lang>
<site>
<id>1</id>
<title>Site Number 1</title>
<feed>[URL unfurl="true"]http://sitenumberone.org/xml/rss.xml</feed>[/URL]
<type>rss</type>
<freshness>1053461676414</freshness>
<refresh>3600</refresh>
</site>
<site>
<id>2</id>
<title>site 2</title>
<feed>[URL unfurl="true"]http://site2.org/slashdot.rdf</feed>[/URL]
<type>rdf</type>
<freshness>1053461676414</freshness>
<refresh>3600</refresh>
</site>
</user>
And I have no idea how to go about getting the individual "site" nodes. Suggestions would be greatly appreciated, code samples always welcome
TIA
leo