Java Parser

F

Frank

I am looking for a reccomendation as to what Java parser I should be
using. I'm looking for something that is freely distributed, has
documentation, and has a wide user base. Any suggestions?
 
S

Steve W. Jackson

:> Frank wrote:
:>
:> > I am looking for a reccomendation as to what Java parser I should be
:> > using. I'm looking for something that is freely distributed, has
:> > documentation, and has a wide user base. Any suggestions?
:>
:> Have a look at: http://xml.apache.org/
:>
:> John

And don't overlook the fact that a major portion of what was the
Xerces-J parser has now been incorporated into Sun's Java.

= Steve =
 
J

John Bokma

Steve said:
:> Frank wrote:
:>
:> > I am looking for a reccomendation as to what Java parser I should be
:> > using. I'm looking for something that is freely distributed, has
:> > documentation, and has a wide user base. Any suggestions?
:>
:> Have a look at: http://xml.apache.org/
:>
:> John

And don't overlook the fact that a major portion of what was the
Xerces-J parser has now been incorporated into Sun's Java.

Thanks Steve, didn't know that.

John
 
F

Frank

I am looking for a reccomendation as to what Java parser I should be
using. I'm looking for something that is freely distributed, has
documentation, and has a wide user base. Any suggestions?

Thany you both. I'm installing Xerces. That looks like it will meet
my needs.
 
W

woo hoo

I am using Xerces2 2.5. I am trying to validate my xml with
schemas. Does anyone have any idea how to do this. My relevant code
is:


import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.apache.xerces.jaxp.DocumentBuilderFactoryImpl;

import .....

class foo {
public void loadXML(URL url) throws
ParserConfigurationException, SAXException, IOException {

DocumentBuilder builder;

DocumentBuilderFactory factory =
DocumentBuilderFactoryImpl.newInstance();

factory.isIgnoringElementContentWhitespace();

factory.isValidating();

builder = factory.newDocumentBuilder();

Document document = builder.parse(url.toString());
// Do stuff with DOM here...
}

// etc.
}


thanks alot
 
W

woo hoo

never mind.. dur!!!!

I am using Xerces2 2.5. I am trying to validate my xml with
schemas. Does anyone have any idea how to do this. My relevant code
is:


import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.apache.xerces.jaxp.DocumentBuilderFactoryImpl;

import .....

class foo {
public void loadXML(URL url) throws
ParserConfigurationException, SAXException, IOException {

DocumentBuilder builder;

DocumentBuilderFactory factory =
DocumentBuilderFactoryImpl.newInstance();

factory.isIgnoringElementContentWhitespace();

factory.isValidating();

builder = factory.newDocumentBuilder();

Document document = builder.parse(url.toString());
// Do stuff with DOM here...
}

// etc.
}


thanks alot
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top