Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting started with Java and XML  RSS feed

 
Jill Smythe
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Although I am pretty familiar with Java, I am a total newbie with using it to parse XML. I have been reading quite a few tutorials so am getting a good understanding of it and am thinking of using the DOM model for my purposes.
What I haven't been able to find, however, is how I can actually get started with this. I have tried compiling a few examples and have been getting errors such as:
>> xmltest.java package javax.xml.parsers does not exist
>> xmltest.java package org.w3c.dom does not exist
etc etc...
It looks like these packages don't come with J2SE. Can anyone confirm this? Do I need to download and install the Java Web Services Developer Pack to solve this problem?
Finally, I know I will need an XML parser but have read that JDK 1.4 has it's own parser (Crimson). Is this adequate for parsing XML files or will I also need a parser such as Xerces?
Thanks so much for any help!
 
Alex Sack
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
crimson lacks some nice features, including dom2 & sophisticated dtd parsing. Nevertheless for normal xml parsing, crimson parser should be sufficient.
Be aware that if you need full namespace support you should go for xerces2
asac
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm moving this to the XML forum where its a bit more appropriate, so please continue the discussion here. Thanks!
Also.... "asac"
Welcome to the JavaRanch!
We like to keep a nice professional lookin' image here (despite that one eyed moose)... so please adjust your displayed name to match the JavaRanch Naming Policy. You can change it here.
Thanks! and again, welcome to the JavaRanch!
[ January 28, 2004: Message edited by: Jessica Sant ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!