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