• 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

What API do I use for XML ???

 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
The question is relavively simple...
these are my requirements.....
1. I get an input as an XML String/file (i dont know the XML structure) considering it is to be made generic otherwise i am open to work with the idea that i know what the XML format is.
2. I need to parse the XML file/string.
3. Append more data and convert the data to XML file/string.

I have been researching and have seen there are number of parsers available like SAX,DOM,dom4j,JAXP,JDOM etc...

Whats the best parser that i can use? that is relativelty easy to use and setup and which does not consume too much time..?

Does any one have experience in such stuff before... im a newbie to XML related stuff.

All help will be appreciated.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Narain,

The best tool that you can use if you know the XML Schema is XMLBeans.

XMLBeans developed by BEA and made it opensource ... Now It is part of Apache Projects.

I too dont have much idea about all XML stuff, but for parsing and creating of XML docs you can blindly go with XML Beans... as i found it as very less time consuming tool, and very simple too.

Get Start from : http://xmlbeans.apache.org/

Hope it will help you.

Thanks & Regards,
Prasad
[ June 02, 2005: Message edited by: krishna prasad rao veeramalla ]
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Krishna,

Does NetBeans work with JRE 1.3 /JDK 1.3

Thanks,
MD
[ June 03, 2005: Message edited by: milan doshi ]
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my opinion you should upgrade to Java 1.5 and use the built in standard library for XML. The J2SE has had XML built in since version 1.4.
Bill
 
milan doshi
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thanks for the suggestion. You are an author of a Book and hence you will understand better than others that life is not so easy.....

I have an ongoing project which already has many many products and it has been using JRE 1.3 since the project started .

Yes, we do have upgration plan but in a project of this magnitude it will take few months and I do not think all the Producst will be upgradede before 2006.Hence I am looking for an alternative solution.

I can ofcourse, parse it and do it myself (without using JDOM, NetBeans ,Castor, JAXB etc)...but does that make sense?

Thanks,
MD
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I looked around the Apache Software Foundation site for compatibility information with their Xerces and Xalan XML projects - unfortunately I didn't find anything definative with respect to SDK 1.3 compatibility so I think you are going to have to do some experimentation if you go that route.

There have been a number of simplified toolkits for xml that are much smaller than the Apache versions. For example kXML (Sourceforge Page) - which I used a number of years ago.
Bill
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by madhup narain:
1. I get an input as an XML String/file (i dont know the XML structure) considering it is to be made generic otherwise i am open to work with the idea that i know what the XML format is.
2. I need to parse the XML file/string.
3. Append more data and convert the data to XML file/string.



for this task, I guess a older version of xerces-j is enough. => http://xml.apache.org/xerces-j/faqs.html

the latest xerces-j also says
jdk compatibility, jdk1.3 is enough.

Well..its better if you do the experiments right on.
reply
    Bookmark Topic Watch Topic
  • New Topic