File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes Help parse using JAXP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Help parse using JAXP" Watch "Help parse using JAXP" New topic
Author

Help parse using JAXP

Patricia Fulk
Ranch Hand

Joined: Sep 10, 2001
Posts: 62
Hello,
Can someone help me out. I am trying to load xml into an object and it is giving me problems. The xml is as follows:
<companys>
<company>
<name>test company name</name>
</company>
<model>
<name>Conservative</name>
<max-percent>18</max-percent>
<min-percent>1</min-percent>
<class>
<name>Large Value</name>
<percent>5</percent>
</class>
<class>
<name>Large, Mid, Small Blend</name>
<percent>20</percent>
</class>
</model>
</companys>
I am trying to get the class name and percents into an object but I keep getting a null pointer exception. Here is the code:

If someone could help I would really appreciate it.
Thanks,
Trish
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help parse using JAXP
 
Similar Threads
Parsing XML doc
xml updations and deletions
SAX parser
Can some one help I keep getting a d**m null value and no examples work
How to compare two huge xml files