Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to selectsinglenodes with attribute value
Message
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
00961280
Message ID:
00961519
Views:
7
There were 2 XSDs. I removed them from the folder, but that was before I got this deep into the DOM. I forgot about those guys. Thanks!

I'll move em back and do a few runs!

Wouldn't DOM report an error or a parse error id a required XSD is not available?



>Huh Terry,
>
>I'm blind...
>
>Base Source code for MS XMLDOM, XML a XSD on local disc, but I don't know how use it for www.
>
>sc=createobject("MSXML2.XMLSchemaCache.4.0")
>sc.Add("http://www.adlnet.org/xsd/adlcp_v1p3", "your_xsd_file.xsd")
>
>doc=CREATEOBJECT("MSXML2.DOMDocument.4.0")
>doc.schemas = sc
>doc.async = .F.
>doc.setProperty("SelectionNamespaces", [xmlns:cvp="http://www.adlnet.org/xsd/adlcp_v1p3"])
>?doc.Load("your_xml_file.xml")
>
>* Select all nodes resource with attribute href
>loXX=m.loXML.documentElement.selectNodes('*/resource[@href]')
>
>* Select all nodes resource with attribute href=intro.htm
>loXX=m.loXML.documentElement.selectNodes('*/resource[@href="intro.htm"]')
>
>* Select all nodes resource with attribute adlcp:scormType (may be)
>loXX=m.loXML.documentElement.selectNodes('*/resource[@adlcp:scormType]')
>
>
>MartinJ
>
>>>Hi Terry,
>>>
>>>Can you paste valid XML (part)?
>>>
>>>MartinJ
>>
>>it's big (sorry michele:)
>>the "resources" node is oXML.documentelement.childnodes(2)
>>
>>
>><?xml version="1.0" standalone="no" ?>
>><manifest identifier="photo-MANIFEST-none" version="1.3"
&gt;>    xmlns="http://www.imsglobal.org/xsd/imscp_v1p1"
>>    xmlns:adlcp="http://www.adlnet.org/xsd/adlcp_v1p3"
>>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>    xsi:schemaLocation="http://www.imsglobal.org/xsd/imscp_v1p1 imscp_v1p1.xsd
>>                        http://www.adlnet.org/xsd/adlcp_v1p3 adlcp_v1p3.xsd">
>>...
>></manifest>
>>
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform