Re: XML Help
I take it that's Dom as in short for Dominic... don't ask me why, I just happened to notice that you usually sign emails with Dominic and thought it was funny that you suddenly signed this one with Dom in a spot where it might be confused with document object model. :P lol, I AM the document object model! As for the XML in element names, it turns out I was right for once! http://www.w3schools.com/xml/xml_elements.asp I guess the trouble is that not all parsers and programs are picking up on it consistently (this ColdFusion behaviour being a good example). The DOM ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295522 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: XML Help
Have a look at using XMLSearch cfsavecontent variable=x?xml version=1.0 standalone=no? !DOCTYPE schema SYSTEM http://devweb0010.propay.com/PPResponse; XMLResponse XMLTrans transType02/transType invNumpp1/invNum status00/status transNum2/transNum /XMLTrans /XMLResponse/cfsavecontent cfset x = XMLParse(x) cfdump var=#x# cfset status = XMLSearch(x, /XMLResponse/XMLTrans/status) cfdump var=#status[1].XmlText# Adrian http://www.adrianlynch.co.uk/ -Original Message- From: Dave Hatz [mailto:[EMAIL PROTECTED] Sent: 28 December 2007 14:14 To: CF-Talk Subject: XML Help I am having a hell of a time trying to figure out what I am doing wrong with the following XML: ?xml version=1.0 standalone=no? !DOCTYPE schema SYSTEM http://devweb0010.propay.com/PPResponse; XMLResponse XMLTrans transType02/transType invNumpp1/invNum status00/status transNum2/transNum /XMLTrans /XMLResponse I have the following CF code to parse the XML: cffile action=read file=d:/inetpub/wwwroot/x2.xml variable=infile cfset x2=XmlParse(infile) cfdump var=#x2# cfset x=x2.XMLResponse.XMLTrans.status.XmlText Everytime I try to access any of the elements of the XML I get : Element XMLRESPONSE.XMLTRANS.STATUS.XMLTEXT is undefined in X2 I have tried it with .XmlText and without .XmlText and get the same results. When I view the CFDUMP of the XML, it looks fine. Can someone please clue me in on what I am doing wrong here? I am running this on CF7 on a Windows 2003 box. Thanks, Dave ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295471 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML Help
Hm this is an odd one. I think it is to do with the element names beginning with 'XML'. Please someone correct me if I am wrong but I think that that is not well formed xml, element names must not begin with 'XML'. If you remove the XML from the tag names, the code works. If you have no control over the format of this xml, this will work: cffile action=read file=d:/inetpub/wwwroot/x2.xml variable=infile cfset x2 = XmlParse(infile) cfset statusXML = XMLSearch(x2, //XMLTrans/status) cfset x = statusXML.XmlText Regards, Dominic -- Blog it up: http://fusion.dominicwatson.co.uk ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295472 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: XML Help
Adrian, That worked, thank you. But, why can't I access the elements the way I had it? I have used that method many times before with no problems. Is there something wrong with the XML that was sent to us? Dave -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Friday, December 28, 2007 6:37 AM To: CF-Talk Subject: RE: XML Help Have a look at using XMLSearch cfsavecontent variable=x?xml version=1.0 standalone=no? !DOCTYPE schema SYSTEM http://devweb0010.propay.com/PPResponse; XMLResponse XMLTrans transType02/transType invNumpp1/invNum status00/status transNum2/transNum /XMLTrans /XMLResponse/cfsavecontent cfset x = XMLParse(x) cfdump var=#x# cfset status = XMLSearch(x, /XMLResponse/XMLTrans/status) cfdump var=#status[1].XmlText# Adrian http://www.adrianlynch.co.uk/ -Original Message- From: Dave Hatz [mailto:[EMAIL PROTECTED] Sent: 28 December 2007 14:14 To: CF-Talk Subject: XML Help I am having a hell of a time trying to figure out what I am doing wrong with the following XML: ?xml version=1.0 standalone=no? !DOCTYPE schema SYSTEM http://devweb0010.propay.com/PPResponse; XMLResponse XMLTrans transType02/transType invNumpp1/invNum status00/status transNum2/transNum /XMLTrans /XMLResponse I have the following CF code to parse the XML: cffile action=read file=d:/inetpub/wwwroot/x2.xml variable=infile cfset x2=XmlParse(infile) cfdump var=#x2# cfset x=x2.XMLResponse.XMLTrans.status.XmlText Everytime I try to access any of the elements of the XML I get : Element XMLRESPONSE.XMLTRANS.STATUS.XMLTEXT is undefined in X2 I have tried it with .XmlText and without .XmlText and get the same results. When I view the CFDUMP of the XML, it looks fine. Can someone please clue me in on what I am doing wrong here? I am running this on CF7 on a Windows 2003 box. Thanks, Dave ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295474 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: XML Help
Adrian, That worked, thank you. But, why can't I access the elements the way I had it? I have used that method many times before with no problems. Is there something wrong with the XML that was sent to us? Yes, the element names are not well-formed. They should not begin with 'XML'. Give them a good telling off I would! Dominic -- Blog it up: http://fusion.dominicwatson.co.uk ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295475 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: XML Help
Is that a CF or XML thing? Adrian http://www.adrianlynch.co.uk/ -Original Message- From: Dominic Watson Sent: 28 December 2007 15:11 To: CF-Talk Subject: Re: XML Help Adrian, That worked, thank you. But, why can't I access the elements the way I had it? I have used that method many times before with no problems. Is there something wrong with the XML that was sent to us? Yes, the element names are not well-formed. They should not begin with 'XML'. Give them a good telling off I would! Dominic -- Blog it up: http://fusion.dominicwatson.co.uk ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295478 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML Help
Is that a CF or XML thing? An XML thing. Dom ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295481 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: XML Help
Hm this is an odd one. I think it is to do with the element names beginning with 'XML'. Please someone correct me if I am wrong but I think that that is not well formed xml, element names must not begin with 'XML'. If you remove the XML from the tag names, the code works. I could be wrong, but I could swear I had been able to parse manipulate an xml packet with a root element of xml before... On the other hand, I'm pretty certain that I've seen cases in which some XML parsing that is supposed to work doesn't and fails because of the xml declaration at the top outside of the xml packet ?xml version=1.0 standalone=no? Even though that's supposed to be valid xml as far as I know. And in spite of my comfortability with XSL, this isn't my strongest area, so don't quote me. :) -- s. isaac dealey ^ new epoch isn't it time for a change? ph: 503.236.3691 http://onTap.riaforge.org ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295517 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML Help
Is that a CF or XML thing? An XML thing. Dom I take it that's Dom as in short for Dominic... don't ask me why, I just happened to notice that you usually sign emails with Dominic and thought it was funny that you suddenly signed this one with Dom in a spot where it might be confused with document object model. :P -- s. isaac dealey ^ new epoch isn't it time for a change? ph: 503.236.3691 http://onTap.riaforge.org ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295518 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XML Help
Never mind--got this figured out! Matt [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: XML help.
you've got quotes around xmlResponse. So CF is searching that string (xmlResponse) instead of the variable xmlResponse. You don't need quotes around 1 either because it's a number, or number. ;-) -Original Message- From: Tony Weeg [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 31 July 2002 2:33 p.m. To: CF-Talk Subject: XML help. why doesnt this findNoCase function work? i know for a fact that status_code=READY/ is in the contents of the variable xmlResponse. help :( cfset xmlResponse=#XMLFormat(cfhttp.filecontent)# cfif #FindNoCase('status_code=READY/','xmlResponse','1')# Found It! /cfif ...tony tony weeg [EMAIL PROTECTED] www.revolutionwebdesign.com rEvOlUtIoN wEb DeSiGn 410.334.6331 __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: XML help.
never mind, having looked over the code, i just needed hash's around the xmlResponse thingie :) tony -Original Message- From: Tony Weeg [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 10:33 PM To: CF-Talk Subject: XML help. why doesnt this findNoCase function work? i know for a fact that status_code=READY/ is in the contents of the variable xmlResponse. help :( cfset xmlResponse=#XMLFormat(cfhttp.filecontent)# cfif #FindNoCase('status_code=READY/','xmlResponse','1')# Found It! /cfif ..tony tony weeg [EMAIL PROTECTED] www.revolutionwebdesign.com rEvOlUtIoN wEb DeSiGn 410.334.6331 __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: XML help.
thanks matt. -Original Message- From: Matthew Walker [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 10:45 PM To: CF-Talk Subject: RE: XML help. you've got quotes around xmlResponse. So CF is searching that string (xmlResponse) instead of the variable xmlResponse. You don't need quotes around 1 either because it's a number, or number. ;-) -Original Message- From: Tony Weeg [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 31 July 2002 2:33 p.m. To: CF-Talk Subject: XML help. why doesnt this findNoCase function work? i know for a fact that status_code=READY/ is in the contents of the variable xmlResponse. help :( cfset xmlResponse=#XMLFormat(cfhttp.filecontent)# cfif #FindNoCase('status_code=READY/','xmlResponse','1')# Found It! /cfif ...tony tony weeg [EMAIL PROTECTED] www.revolutionwebdesign.com rEvOlUtIoN wEb DeSiGn 410.334.6331 __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists