File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Parsing an XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Parsing an XML" Watch "Parsing an XML" New topic
Author

Parsing an XML

cserveny
Greenhorn

Joined: Sep 16, 2002
Posts: 1
Can anyone please help me out. I am trying to parse and XML by using Caster. I do not really understand how it works. I have an xml file with has some tag like these:
<EXPORT>
<SECTION>
<NAME>Client</NAME>
<FILE>1.new</FILE>
<FIELD name="client_shortname" type="CSF" width="?">
<OBJECT name="Client" method="ClientShortName"/>
</FIELD>
</SECTION>
</EXPORT>
When I run the following line of code on the above code it falls over:
Mapping mapping = new Mapping();
mapping.loadMapping("test.xml");
I have looked at some examples on the web and the example codes had tags like: <mapping><description> bla blab bal</description>
<class name="MMMM">
<field name="XXX"> etc
Does this mean that I am only allowed to use these tags above?
Please help me I have been vaisting 4 hrs on this.
Thanks
Kinga
When I run the
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
cserveny
Welcome to the JavaRanch! Please adjust your display name to meet
the JavaRanch Naming Policy. You can change it here.
Thanks!
and welcome to the JavaRanch!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Parsing an XML