I'm trying to figure out how to handle an XML file that will be
transmitted to my web app. Since I don't have an example of the actual
XML file, I created a test XML document stored in the variable named
"myXML".

First, how do I access the XML document that will be posted to my web
app (via HTTPS POST)?

Second, is there any easier way to refer to an particular XML element
as a simple value as I am attempting to do here with
"#variable.myXMLName[1].XmlText#"?  


<cfoutput>
Hello world.<br>

<cfset variable.myXML = "<?xml
version='1.0'?><CONTACT><NAME><FIRST>Rebecca</FIRST><LAST>Wells</LAST></NAME><CONTACTDETAILS>
<EMAIL>[EMAIL PROTECTED]</EMAIL><TELEPHONE>(425)
430-6884</TELEPHONE></CONTACTDETAILS></CONTACT>">

<cfset variable.myXMLName = #XmlSearch(XmlParse(variable.myXML),
"/CONTACT/NAME/FIRST")#>

My name is <em>#variable.myXMLName[1].XmlText#.</em>
</cfoutput>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:211292
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to