RE: XmlSearch() returning Attribute Values
-- Alex Sherwood PHS Collection Agency THE COLLECTORS T: 301.215.4200 F: 301.664.6834 W: www.phs-net.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: XmlSearch() returning Attribute Values
> I don't really think the fact that XMLSearch will only return element arrays > is a big limitation. I don't think it's a big limitation either, just annoying Massimo Foti Certified Dreamweaver MX Developer Certified Advanced ColdFusion MX Developer http://www.massimocorner.com/ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: XmlSearch() returning Attribute Values
How about a = XMLSearch(xmlDoc, '/document/node); attrValue = a.xmlAttributes.attributeVal; I don't really think the fact that XMLSearch will only return element arrays is a big limitation. Sam --- Blog: http://www.rewindlife.com Charts: http://www.blinex.com/products/charting --- > -Original Message- > From: Alexander Sherwood [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 02, 2003 2:33 PM > To: CF-Talk > Subject: XmlSearch() returning Attribute Values > > It seems as if XML Search only returns element nodes, and > that's it. Poor, poor, poor planning, IMHO. > > Has anyone created a work around, for example, for doing the > following: > > --- > > XMLSearch(xmlDoc, '/document/node/@attributeVal') > > --- > > to return the string value of the attribute "attributeVal" > for element "node"? > > [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: XmlSearch() returning Attribute Values
> It seems as if XML Search only returns element nodes, and that's it. Poor, > poor, poor planning, IMHO. > Yes, it only return Node Lists, I posted on LiveDocs about it. Mine is the first comment: http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/funca126.htm#wp427963 6 > Has anyone created a work around, for example, for doing the following: > > XMLSearch(xmlDoc, '/document/node/@attributeVal') > > to return the string value of the attribute "attributeVal" for element "node"? If you really care, you can use the XPath classes from Xalan. But I am not sure it's worth the efforts... Massimo Foti Certified Dreamweaver MX Developer Certified Advanced ColdFusion MX Developer http://www.massimocorner.com/ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: XmlSearch() returning Attribute Values
The xmlSearch() returns an array of XML object nodes using regular XPath _expression_ like e.g.. myBook = xmlSearch(xmlBooks, "Books/[EMAIL PROTECTED]'ColdFusion']"); Then you can plough through the array returned to do whatever Joe Eugene - Original Message - From: Alexander Sherwood To: CF-Talk Sent: Tuesday, December 02, 2003 2:33 PM Subject: XmlSearch() returning Attribute Values It seems as if XML Search only returns element nodes, and that's it. Poor, poor, poor planning, IMHO. Has anyone created a work around, for example, for doing the following: --- XMLSearch(xmlDoc, '/document/node/@attributeVal') --- to return the string value of the attribute "attributeVal" for element "node"? -- Alex Sherwood PHS Collection Agency THE COLLECTORS T: 301.215.4200 F: 301.664.6834 W: www.phs-net.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
XmlSearch() returning Attribute Values
It seems as if XML Search only returns element nodes, and that's it. Poor, poor, poor planning, IMHO. Has anyone created a work around, for example, for doing the following: --- XMLSearch(xmlDoc, '/document/node/@attributeVal') --- to return the string value of the attribute "attributeVal" for element "node"? -- Alex Sherwood PHS Collection Agency THE COLLECTORS T: 301.215.4200 F: 301.664.6834 W: www.phs-net.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]