Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parsing with Java Factories

Status
Not open for further replies.

coupster

Programmer
Aug 18, 2005
2
GB
Hey everybody,

Just started playing around with XML and their schemas using the various Java factory classes and i've come up againist a few problems. I keep getting these validation errors -

org.xml.sax.SAXParseException: Document is invalid: no grammar found.
org.xml.sax.SAXParseException: Document root element "book", must match DOCTYPE root "null".
cvc-complex-type.3.2.2: Attribute 'xsi:noNamespaceSchemaLocation' is not allowed to appear in element 'book'.

Now i am right in thinking that XML documents that are using XSD's don't need the DOCTYPE line? Am i not understanding something about XML files or is xerces just complaining about stuff that is'nt really relavent as i'm not using DTD's? If so, does any1 know away of telling it to stop it thinking in DTD's?

Any thoughts on this would be appreciated, as its got me fuddled.

Cheers

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top