cpv_flex
asked on
Validation failing using cXML
I get his error: "The parameter entity replacement text must nest properly within markup declarations. An error occurred at file:///T:/Clients/L_c/Lon e Star Supplies/Invoicer/Invoicer /bin/Invoi ceDetail.d td, (3929, 79)."
the XML doc: http://qdataviewer.com/downloads/Invoice2.xml
the dtd doc: http://qdataviewer.com/downloads/InvoiceDetail.dtd
Below is my code:
Dim source As String = AppDomain.CurrentDomain.Ba seDirector y & "invoice2.xml"
Dim XMLDoc2 As Xml.XmlTextReader
Dim xr As Xml.XmlValidatingReader
XMLDoc2 = New Xml.XmlTextReader(source)
xr = New Xml.XmlValidatingReader(XM LDoc2)
xr.ValidationType = Xml.ValidationType.DTD
Try
While xr.Read()
Debug.Write(i)
i = i + 1
End While
xr.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
the XML doc: http://qdataviewer.com/downloads/Invoice2.xml
the dtd doc: http://qdataviewer.com/downloads/InvoiceDetail.dtd
Below is my code:
Dim source As String = AppDomain.CurrentDomain.Ba
Dim XMLDoc2 As Xml.XmlTextReader
Dim xr As Xml.XmlValidatingReader
XMLDoc2 = New Xml.XmlTextReader(source)
xr = New Xml.XmlValidatingReader(XM
xr.ValidationType = Xml.ValidationType.DTD
Try
While xr.Read()
Debug.Write(i)
i = i + 1
End While
xr.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I don't want to change the DTD becuase it is an industry standard, but I'll just ingore the message I was getting.
Thanks.