Java Parser

Frank (archive)

Usenet Archive
Joined
Nov 21, 2000
Messages
417
Reaction score
0
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?
 

Steve W. Jackson

Usenet Archive
Joined
Feb 9, 2001
Messages
492
Reaction score
0
> 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 =
 

John Bokma

Usenet Archive
Joined
Jul 17, 2003
Messages
2,948
Reaction score
0
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
 

Frank (archive)

Usenet Archive
Joined
Nov 21, 2000
Messages
417
Reaction score
0
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.
 

woo hoo

Usenet Archive
Joined
Nov 8, 2003
Messages
2
Reaction score
0
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
 

woo hoo

Usenet Archive
Joined
Nov 8, 2003
Messages
2
Reaction score
0
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
548,208
Messages
3,104,802
Members
249,594
Latest member
henrywalsh

Latest Threads

Top