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
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