Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Xmltocursor
Message
De
07/03/2003 12:13:09
 
 
À
07/03/2003 12:08:28
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Titre:
Divers
Thread ID:
00762807
Message ID:
00762811
Vues:
13
>Can it be done with an xml sample like this:
>
><?xml version="1.0"?>
><root  xmlns:dt="urn:schemas-microsoft-com:datatypes" >
><application>
>	<id dt:dt="number">3</id>
>	<acronym>ABC</acronym>
>	<version dt:dt="number">6.3</version>
>	<name>American Broadcasting Corporation</name>
>	<status>Development</status>
>	<PAC-status>N/A</PAC-status>
>	<department>Sales</department>
></application>
></root>
>
I tried several combinations and I can't. This XML is created from another development environment, and the way it is created, can't be handled by VFP's XMLTOCURSOR(). Unless someone comes up with a magic solution, you will have to use the DOM object() for that such as:
* Return a specific XML node value
* expC1 XML content
* expC2 Node localization
FUNCTION GetXMLValue
PARAMETERS tcXML,tcNode
LOCAL lcValue,loXML,loNode
lcValue=''
loXML=CREATEOBJECT('MSXML.DOMDocument')
loXML.LoadXML(tcXML)
loNode=loXML.SelectSingleNode(tcNode)
lcValue=loNode.GetAttribute('Value')
RETURN lcValue
so to parse it manually and create the cursor by yourself.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform