Hi,
I need to parse (as I wrote) xml-Files to store/update data in a db on a
server running cf5..
So I'm using soxml to create a DOM object. (usng XML2DOM because XML2CF
is much too slow..)
Can anybody give some tips about how to handle this..?
E.g. I can access a node 'contact' in the root-element 'shop' by:
<cf_SOXML
action="XML2DOM"
input="strXml.currLoopXMLCont#"
output="oShopsXML" />
<cfloop collection="#oShopsXML.selectNodes("osp:Shop/Contact")#" item="idxShop">
<cfscript>
ndPulicMail = idxShop.selectSingleNode("PublicMailAddress");
</cfscript>
<cfoutput>
#ndPulicMail.Text#
</cfoutput>
</cfloop>
But how e.g. can I access Payment/Item/Name in shop?
<Payment>
<Item>
<Name>debit</Name>
</Item>
<Item>
<Name>on delivery</Name>
<Surcharge>6</Surcharge>
</Item>
<Item>
<Name>invoice</Name>
</Item>
</Payment>
<cfset oPayment=oShopsXML.getElementsByTagName("Payment")>
<cfloop collection="#oPayment#" item="pm">
<!--- how can I access item/name here? --->
</cfloop>
maybe someone has a good source about dom?
thx
--
Sebastian Mork <[EMAIL PROTECTED]>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232261
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