I am trying to parse this XML document below and access the attributes in the
Child (Fields). The problem is that I cannot get past the XMLChild of ENVELOPE
because it has no end Tag. I know that /> means it is the end tag but how does
CF know this or how do I make CF know this? Does anyone have an idea on how to
access the Child (Fields)? The XML and my code are below:
<!------ XML ------>
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
<RESPONSE>
<FEATURES>
<FEATURE>
<ENVELOPE minx="253456" miny="224100" maxx="253456" maxy="224100"/>
<FIELDS SDE.DBO.SDE_VOIS_EVENT.CATEGORY_TYPE="Other" SHAPE.fid="9878"
SDE.DBO.SDE_VOIS_EVENT.NAME="Northumberland Co./Rt. 617/Road Closure/9-01-2004"
SDE.DBO.SDE_VOIS_EVENT.NOTES="2-14-05 Route 617 in Northumberland County at
Gardy's Mill pond remains closed pending repairs to the spillway
structure and earthern dam." SDE.DBO.SDE_VOIS_EVENT.STATUS="Open"
SDE.DBO.SDE_VOIS_EVENT.REPORTDATE="1108389720000"
SDE.DBO.SDE_VOIS_EVENT.CATEGORY="Other" SDE.DBO.SDE_VOIS_EVENT.EVENT_ID="43763"
SDE.DBO.SDE_VOIS_EVENT.X="253456" SDE.DBO.SDE_VOIS_EVENT.Y="224100"
SHAPE="[Geometry]" />
</FEATURE>
FEATURES></RESPONSE></ARCXML>
<!--- My current CODE that can't get by the ENVELOPE Child --->
<CFSET mydoc = XmlParse(xmldoc)>
<CFOUTPUT>
<CFSET Root =
#mydoc.XMLRoot.XMLChildren[1].XMLChildren[1].XMLChildren[1].XMLChildren[1].XMLName#>
#Root#
</CFOUTPUT>
Thanks,
Jim
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199566
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54