I don't know man - if you are parsing xml, you are making some
assumptions about the structure. The functions are there just for that
reason. Sometimes you need the string value of a node. That's it.It's
no more safe/dangerous than any other xpath function.


On Wed, Dec 7, 2011 at 4:31 PM, Judah McAuley <[email protected]> wrote:
>
> Sure, some functions work on multiple nodes and they are awesome for
> all sorts of things. I just hesitate to use a function that will blow
> up if more than one node is returned when you can write a function
> that will always return the first node and therefore not blow up. I've
> just had two many times where I've written code that assumes that a
> query/search/whatever will only return one record and it works fine
> with all my test cases (because there is only supposed to be one
> record so that's what I put in my test case) and then lo and behold,
> someone inserts a second matching record and things start throwing
> errors because of that assumption I made.
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349020
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to