  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | Parsing XML with JDOM | Parsing XML with JDOM 2006-08-09 - By funkdoc
Back
I'm trying to get the children of children out of this XML file and I'm having a heck of a time. I've read every website you could possibly think of, and cannot figure out how to pull out Children out of Children. I have attached my Java file, which can pull out the root and child nodes, but not children of the children. Any help is greatly appreciated. And yes, I know I'm missing brackets at the end. How do I get the subitem and it's attributes????Iterator???
I have an XML file like this: <?xml version="1.0" encoding="UTF-8 (See http://UTF-8.ora-code.com)" ?> <record> <item type="stock" name="XM"> <subitem period="fiveyear">0.20</subitem> <subitem period="tenyear">0.40</subitem> </item> <item type="stock" name="Sirius"> <subitem period="fiveyear">0.20</subitem> <subitem period="tenyear">0.40</subitem> </item> </record> http://www.nabble.com/user-files/237/satradio.java satradio.java -- View this message in context: http://www.nabble.com/Parsing-XML-with-JDOM -tf2080498.html#a5731329 Sent from the JDOM - General forum at Nabble.com.
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ To control your jdom-interest membership: http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
|
|
 |