• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 224
  • Last Modified:

easy XML parsing ?

ok, this should be very easy if you know it ...

Until now i've been parsing my XMLs with the SAX API in the xerces.jar library. My problem was that I was using it in an applet and slapping xerces along with the applet was making it too big...

So i wandered around the java packages searching for another way to parse the bastards (I just read an already made xml). And I found this:


SAXParser parser;
try {
parser = SAXParserFactory.newInstance().newSAXParser();
} catch (Exception ex) {
ex.printStackTrace();
}

and later I call

parser.parse(InputSource is, DefaultHandler dh)

.... and it works ! with no xerces ...

So my question is this: have I been living under a rock ??? the package javax.xml.parsers.* contains a real implemetation of an XML parser (however simple that is) ??? and this should work with no xerces, just the jre installed ??

thanks
0
hapciu
Asked:
hapciu
1 Solution
 
ramazanyichCommented:
xerces is included into JDK1.4.
0
 
ramazanyichCommented:
If you check API documentation of J2SE1.4 you will see that it is javax.xml.* is included into standard API of java1.4
0
 
hapciuAuthor Commented:
included in JDK.
so any user (not developer) having JRE1.4.x (not JDK) installed, should have no problems using my applet (even if i don't put xerces.jar in my codebase) ?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
rrzCommented:
>so any user
Any user with the Java Plug-in 1.4  .
0
 
ramazanyichCommented:
Yes, any user who has installed JRE 1.4
0
 
Mayank SAssociate Director - Product EngineeringCommented:
>> should have no problems using my applet

Did you use xerces in an Applet? Does the client have an M$ VM or Sun's VM?
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now