Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] Validate questions

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Arjan Huijzer <huijzer AT gmail.com>
  • To: XOM-interest AT lists.ibiblio.org
  • Cc:
  • Subject: [XOM-interest] Validate questions
  • Date: Thu, 27 Jan 2005 10:51:31 +0100

Hi all,

I have been adding a validity check to my XML documents and have a
couple of questions:

1. Does XOM support validation against an XML schema? So far, I have
only been able to validate againt a DTD

2. Do I have to include a doctype declaration to my XML document or
can I also declare in my java code against which DTD the document
should be validated.


Furthermore, I noticed some odd behaviour. My code to parse an XML
document used to be:

Document doc = parser.build("c:/xomtest/books.xml");

This worked fine until I switched to Xerces, which bow trows an
IOException. I had to modify my code to read:

Document doc = parser.build("file:///c:/xomtest/books.xml");

Is this second way the correct way? I am a bit puzzled.


Thanks in advance for any help,

Arjan Huijzer




Archive powered by MHonArc 2.6.24.

Top of Page