[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Schema / XML document parsing

  • To: "Phil Fuhlman" <pfuhlman@D...>,"xml-dev" <xml-dev@l...>
  • Subject: RE: Schema / XML document parsing
  • From: "Dare Obasanjo" <dareo@m...>
  • Date: Fri, 19 Apr 2002 10:41:10 -0700
  • Thread-index: AcHnpRbuxeajnpbWSUCdL6t923LyIwAFdhnQAAOUwUA=
  • Thread-topic: Schema / XML document parsing

error loading xml document
MSXML currently does not support the ability to recover after a
validation error has occurred. This functionality is currently being
considered for a future version. 

-- 
PITHY WORDS OF WISDOM 
The best time to buy something was last year. 
 
This posting is provided "AS IS" with no warranties, and confers no
rights. 
You assume all risk for your use. (c) 2002 Microsoft Corporation. All
rights reserved.



> -----Original Message-----
> From: Phil Fuhlman [mailto:pfuhlman@D...] 
> Sent: Friday, April 19, 2002 8:50 AM
> To: xml-dev
> Subject: RE:  Schema / XML document parsing
> 
> 
> The following VBScript exercises this feature in MSXML4. The 
> major problem I have with MSXML4 is that it quits on the 
> first error, versus trying to recover and continue, hopefully 
> catching any and all problems in one pass. (So if any one 
> knows how to change this behavior and will share it I'd be 
> much obliged :) ).
> 
> Set schemaCache = CreateObject("MSXML2.XMLSchemaCache.4.0")
> 
> ' load schema - it reports its own terse syntax errors
> 
> schemaCache.Add "", "C:\schema\model1.xsd"
> 
> Set doc = CreateObject("MSXML2.DOMDocument.4.0")
> Set doc.schemas = schemaCache		' associate schema w/ data (xml
> doc)
> 
> 'Now you are ready to load the XML document and do the validation:
> 
> doc.async = False
> 
> If Not doc.Load("C:\data\model1.xml") Then
> 
>         wscript.echo "Error loading XML document: " & 
> doc.parseError.reason & " errcode: " & doc.parseError.errorCode & "
> line: " & doc.parseError.line & " filepos: " & 
> doc.parseError.filepos & " linepos: " & 
> doc.parseError.linepos & " srctext: " & doc.parseError.srcText
> 
> else
> 
>         wscript.echo "no errors"
> 
> End If
> 
> 
> -----Original Message-----
> From: Dean James Greenwood [mailto:D.Greenwood@c...]
> Sent: Friday, April 19, 2002 8:30 AM
> To: xml-dev
> Subject:  Schema / XML document parsing
> 
> 
> Hello,
> 
> Does anyone know of a class/tool which accepts a XML Document 
> and the corresponding Schema for that document and validates 
> the document against the schema (instance against the type)?
> 
> -- 
> Kind regards,
>        Dean
> 
> Dean James Greenwood BSc
> DCNDS MSc 
> University College London                          
> mailto:dean@d...
> http://www.deangreenwood.com
> 
> 
> 
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org 
> <http://www.xml.org>, an initiative of OASIS 
<http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>


-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.