Newbie: how to make parser find a schema

M

michelle

I've been going through the w3.org schema tutorial and I got stuck.

I created a simple schema and a test xml document. How do I get a
validating parser to find my schema?

I'm using the SAX2Print example program in xerces as my test parser. (It
just parses the file and spits it back out to the screen.) If I use a
DOCTYPE declaration and reference a DTD, the parser validates against the
DTD. How do I make it to the same thing with a schema? My test schema is in
a local directory (actually, the same directory as the xml file).

Thanks.
 
T

Toni Uusitalo

Example at the bottom of page in:
http://xml.apache.org/xerces-c/schema.html

p.s. You should mention you're working with xerces-c, there's also
xerces-j for Java.

michelle said:
I've been going through the w3.org schema tutorial and I got stuck.

I created a simple schema and a test xml document. How do I get a
validating parser to find my schema?

I'm using the SAX2Print example program in xerces as my test parser. (It
just parses the file and spits it back out to the screen.) If I use a
DOCTYPE declaration and reference a DTD, the parser validates against the
DTD. How do I make it to the same thing with a schema? My test schema is in
a local directory (actually, the same directory as the xml file).

Thanks.

with respect,
Toni Uusitalo
 

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,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top