Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Use of MSXML from VFP
Message
From
18/05/2005 06:31:35
 
 
To
17/05/2005 10:59:35
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows Server 2003
Database:
Oracle
Miscellaneous
Thread ID:
01014930
Message ID:
01015254
Views:
21
I have problems with understand how to parse an XML document (for load specific parameters at runtime). Do you know any sample portion of code, or the specific manual for accessing XML from MSXML (DOM)???
loXML = CREATEOBJECT( 'MSXML2.DOMDOCUMENT.4.0' )
loXML.async = .F.

*** The XML document is now ready to be composed.
*** Defining the Root Element
WITH loXml
  loRoot = .CreateElement( '<< Node Name >>' )
  *** Now add the root element to the document
  .AppendChild( loRoot )
ENDWITH

*** Setting Attributes
*** The attributes of an element define a specific setting or provide additional
*** information to an element.
loAttribute = loXML.CreateAttribute( '<< attribute name >>' )
loNodeText = loXml.CreateTextNode( '<< attribute value >>' )
*** And append it to its parent node
loAttribute.AppendChild( loNodeText )
loNode.SetAttributeNode( loAttribute )
We have loads of information on using XML in VFP in Chapter 17 of MegaFox: 1002 Things You Wanted to Know About Extending VFP
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform