Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parsing XML with DOM
Message
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Environment versions
Visual FoxPro:
VFP 7
Miscellaneous
Thread ID:
00962465
Message ID:
00964845
Views:
7
Hi Terry

I will try reply you...

xsd files can be on disc or web.
oSC = CreateObject("MSXML2.XMLSchemaCache.4.0")
oSC.add("http://www.imsglobal.org/xsd/imscp_v1p1",;
        "http://www.imsglobal.org/xsd/imscp_v1p1/imscp_v1p1.xsd")
oSC.add("http://www.adlnet.org/xsd/adlcp_v1p3",;
        "http://www.adlnet.org/xsd/adlcp_v1p3/adlcp_v1p3.xsd")
oSC.add("http://www.adlnet.org/xsd/adlseq_v1p3",;
        "http://www.adlnet.org/xsd/adlseq_v1p3/adlseq_v1p3.xsd")
oSC.add("http://www.imsglobal.org/xsd/imsss",;
        "http://www.imsglobal.org/xsd/imsss/imsss_v1p0.xsd")
MartinJ

> loTitle=loNode.selectsingleNode("*[local-name()='title']")
>Martin, I finally got a collection returned with this statement - and without adding a "schema" object.
>oc=oXML.documentElement.childNodes(1).childNodes(0).selectNodes("*/*[local-name()='item']")
>I will google MSXMLDOM and "local-name()" because your post was my first understanding of that "argument".
>
>My XML has this for a schema location:
>
xsi:schemaLocation="http://www.imsglobal.org/xsd/imscp_v1p1 imscp_v1p1.xsd
>                        http://www.adlnet.org/xsd/adlcp_v1p3 adlcp_v1p3.xsd
>                        http://www.adlnet.org/xsd/adlseq_v1p3 adlseq_v1p3.xsd
>                        http://www.imsglobal.org/xsd/imsss imsss_v1p0.xsd"  >
>
>When I check for a namespaceURI:
>?oXML.documentElement.namespaceURI
>returns:
>http://www.imsglobal.org/xsd/imscp_v1p1
>
>It does that without an ADD schema - so I guess MS DOM is managing the schema "automatically". But I do need to validate that the XSDs in the "schemalocation" are included with the content.
>
>One way to do that seems to be:
>oSC = CreateObject("MSXML2.XMLSchemaCache.4.0")
>oSC.add("http://www.adlnet.org/xsd/adlcp_v1p3","adlcp_v1p3.xsd")

>Because, if the XSD is not local to the "folder" oSC.Add will return an error?
>
>Is that the intended use? Is that how external schemas should be validated? Another way would be to parse out the XSD "filename and use VFP's FILE() command.
>
>How should external schema (XSD's) that are in the location list be validated?
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Previous
Reply
Map
View

Click here to load this message in the networking platform