I am attempting to write a XML parser in VB6.
The standards that the XML is based off of comes with a DTD to verify the XML before you begin parsing. I have also written a sample XML file so that I have something with which to test.
I am able to load the XML via the vb6 code
Dim objXMLDoc As MSXML.DOMDocument
Set objXMLDoc = New MSXML.DOMDocument
If Not objXMLDoc.Load("sample.xml") Then
----Goto ErrorHandler
End If
Working XML
<?xml version = "1.0"?>
<Root>
...
</Root>
Trying to validate with my DTD
<?xml version = "1.0"?>
<!DOCTYPE sample SYSTEM "sample.dtd">
<Root>
...
</Root>
The research I did lead me to believe that the Load would validate the XML if the XML pointed to the DTD via the doc type.
I've done a lot of research and cant figure out where I'm going wrong. It could be as simple as the DTD provided isn't syntactically correct, which I'm looking over now. The resources I've found are mostly on MSDN and here http://www.jalix.org/ressources/internet/dom/~vrac/articles/XML%20DOM.html.
Both the xml and dtd are located in the same directory, and I have it parsing the XML with out the doctype tag.
The error I get is:
Error #: -2146697211: The system cannot locate the resouce specified.
error processing resource 'sample.dtd'
Any additional resources, or suggestions would be greatly appreciated.