• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Parsing an XML

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic