Solved

Validation failing using cXML

Posted on 2006-07-07
2
517 Views
Last Modified: 2013-11-19
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
0
Comment
Question by:cpv_flex
2 Comments
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 125 total points
ID: 17062129
Hi cpv_flex,

there is nothing wrong with the DTD
apart from an attribute "property" that doesn't get a correct value, the DTD is valid and the XML is valid according to the DTD

I would change line 3929 like this though
<!ELEMENT ds:Object (#PCDATA | ds:Signature | ds:SignatureProperties | ds:Manifest | %Object.ANY;)* >
a bar added and spaces added

and change line 3830 like this
<!ENTITY % Object.ANY ' xades:QualifyingProperties | cXMLSignedInfo '>
bar removed and spaces added

Cheers!
0
 

Author Comment

by:cpv_flex
ID: 17078233
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.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now