Data Developer Center
Sign in
United States (English)
Brasil (Português)
Česká republika (Čeština)
Deutschland (Deutsch)
España (Español)
France (Français)
Indonesia (Bahasa)
Italia (Italiano)
România (Română)
Türkiye (Türkçe)
Россия (Русский)
ישראל (עברית)
المملكة العربية السعودية (العربية)
ไทย (ไทย)
대한민국 (한국어)
中华人民共和国 (中文)
台灣 (中文)
日本 (日本語)
Home
Library
Learn
Downloads
Support
Community
Forums
Data Developer Center
>
Data Platform Development Forums
>
XML, System.Xml, MSXML and XmlLite
>
MSXML6 reports an error (MSXML4 and Xerces report no error) when validating against a DTD (ProhibitDTD=False and ResolveExternals=True)
MSXML6 reports an error (MSXML4 and Xerces report no error) when validating against a DTD (ProhibitDTD=False and ResolveExternals=True)
Search XML, System.Xml, MSXML and XmlLite Forum
Search All Data Platform Development Forums
Search All MSDN Forums
Ask a question
Friday, January 15, 2010 10:58 AM
0
Sign In to Vote
Hi,
I am validating an XML file against a external DTD using MSXML. When i use MSXML6 an error is reported that is not reported by MSXML4 or Xerces. I do the following:
XMLDOMDocument.async := False;
XMLDOMDocument.setProperty('ProhibitDTD', False);
XMLDOMDocument.resolveExternals := True;
XMLDOMDocument.validateOnParse := True;
The XML:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ONIXMessage SYSTEM "http://www.editeur.org/onix/2.1/03/reference/onix-international.dtd">
<ONIXMessage>
<Header>
<FromCompany></FromCompany>
<SentDate></SentDate>
</Header>
<Product>
<RecordReference></RecordReference>
<NotificationType></NotificationType>
<ERROR></ERROR>
</Product>
</ONIXMessage>;
MSXML6 reports:
Line 9
"Element 'RecordReference' is unexpected according to content model of parent element 'Product'." which is wrong(?)
MSXML4 reports:
Line 11
"Element content is invalid according to the DTD/Schema." which is correct because "<ERROR>" is not allowed in that context.
Can somebody help me?
Thank you,
- Gerben Abbink
Moved by
Qi Samuel Zhang
Microsoft Employee, Moderator
Tuesday, February 22, 2011 4:26 AM
(From:XML in Windows (MSXML and XmlLite))
Reply
Quote
All Replies
Saturday, June 12, 2010 12:24 PM
0
Sign In to Vote
You can check if this http://www.webreference.com/programming/javascript/rg35/2.html is useful to you.
XML
Keyword SEO Market
Reply
Quote
Frequently asked questions - Forums help
© 2012 Microsoft. All rights reserved.
Terms of Use
|
Trademarks
|
Privacy Statement
|
Site Feedback