-
Can anybody suggest me how to validate xml against the DTD in vb
I am working on the xml DOM Document , I have successfully tested the xml
file With the XML spy against the DTD. I want to know the similar functionality
in the vb to validate against the DTD. Can anybody suggest me.
Thanking you
Ash
-
Re: Can anybody suggest me how to validate xml against the DTD in vb
First, create a DOMDocument object:
Set oDoc = New MSXML.DomDocument
Prepare the document for validation
oDoc.validateOnParse = True 'validate against DTD
oDoc.resolveExternals = True 'use external references (parameter entities,
etc.)
Load your XML file:
oDoc.load ("file.xml")
If oDoc.parseError.ErrorCode <> 0 Then ' if any error
MsgBox oDoc.parseError.ErrorCode
Else
MsgBox "No Errors!"
End If
Hope this helps,
J
"AshIndia" <ashokpas@yahoo.com> wrote:
>
>I am working on the xml DOM Document , I have successfully tested the xml
>file With the XML spy against the DTD. I want to know the similar functionality
>in the vb to validate against the DTD. Can anybody suggest me.
>Thanking you
>Ash
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|