<cfset mydoc = XmlParse(xmldoc)>
<!--- parse ea element for argument names and bind --->
<cfset local.fieldvalue = mydoc.XmlRoot.XmlChildren[i].XmlText>
</cfloop>
-----Original Message-----
From: Thomason, Ken L. [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 19, 2003 2:50 PM
To: '[EMAIL PROTECTED]'
Subject: [cf-xml] Retrieving Root attribute
I am relatively new to XML and the XML Toolkit. I am currently able to retrieve elements from an XML structure I am working with but I am not sure how to retrieve an attribute of the ROOT node.
For example this is a snippet of the XML file I am working with:
<?xml version="1.0" standalone="yes" ?>
<!DOCTYPE ROOT (View Source for full doctype...)>
- <ROOT DATE_CREATED="2003-02-19 19:05:23" CREATED_BY="Microsoft Log Parser V2.0">
- <ROW>
<Field1>Field 1</Field1>
<Field2>Field 2</Field2>
<Field3>Field 3</Field3>
</ROW>
</ROOT>I would like to be able to retrieve the DATE_CREATED attribute for the XML document.
As you can see the XML doc is created by Microsoft's Log Parser and I am using the XML toolkit with Cold Fusion 5.Thanks in advance for you help,
Ken
