Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 11 JAN 2008 12:43:04PM Dale Jessop wrote:

Hi,

Can anyone please tell me where I'm going wrong here? I'm trying to validate an XML file against it's XSD. I've download the files from the MSDN website so know I should receive an error message via the

"parseError.errorCode" command, I've tried this

as

xError=oleGetProperty( objDocument, "parseError")

and

xError=oleGetProperty( objDocument, "parseError.errorCode")

but neither work

XMLFile=c:\dj\xml\sl-notvalid.xml"

XSDFile=c:\dj\xml\sl.xsd"

objDocument=oleCreateInstance( "MSXML2.DOMDocument.6.0" )

gosub checkOLEStatus

olePutProperty( objDocument, "Async", 0 )

gosub checkOLEStatus

olePutProperty( objDocument, "ResolveExternals", 1 )

gosub checkOLEStatus

olePutProperty( objDocument, "ValidateOnParse", 1 )

gosub checkOLEStatus

stat=oleCallMethod( objDocument, "Load", XMLFile )

gosub checkOLEStatus

* Check for errors

*xError=oleGetProperty( objDocument, "parseError.errorCode")

xError=oleGetProperty( objDocument, "parseError")

gosub checkOLEStatus

xmlError=oleGetProperty(xError , "errorCode")

gosub checkOLEStatus

return

*————————–*

checkOLEStatus:

*————————–*

status=OleStatus()

if OleStatus() then

x=msg(@window,'OLE Error code: ':status)

end

return

* XML Source *


sl-valid.xml

Gambardella, Matthew

XML Developer's Guide

Computer

44.95

2000-10-01

An in-depth look at creating applications with

XML.


sl-notvalid.xml

Gambardella, Matthew

XML Developer's Guide

Computer

44.95

2000-10-01

An in-depth look at creating applications with

XML.


sl.xsd

–]

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/5a64308708810d47852573cd006153a9.txt
  • Last modified: 2023/12/28 07:39
  • by 127.0.0.1