Link to home
Start Free TrialLog in
Avatar of cpv_flex
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/Lone Star Supplies/Invoicer/Invoicer/bin/InvoiceDetail.dtd, (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.BaseDirectory & "invoice2.xml"
        Dim XMLDoc2 As Xml.XmlTextReader
        Dim xr As Xml.XmlValidatingReader
        XMLDoc2 = New Xml.XmlTextReader(source)
        xr = New Xml.XmlValidatingReader(XMLDoc2)
        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
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cpv_flex
cpv_flex

ASKER

Gertone,

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.