Categories
Archives
Migrating from TFS to SVN | Home | Is Touching Better?
Filed under Quick Tips on December 28, 2007 by Javier JulioReading and Parsing XML In 1 ColdFusion Function
Did you know you can read an XML document and parse it as an XML object using only the ColdFusion xmlParse method? Some examples:
<cfset xml = xmlParse("test.xml")>
Or
<!--- valid protocols: http, https, ftp, and file --->
<cfset xml = xmlParse(" http://www.mysite.com/test.xml")>
No need to read the file beforehand. Simple as that.
Trackback Pings (TrackBack URL for this entry)
http://www.arc90.com/cgi-bin/mt4/mt-tb.cgi/94.
Comments
That's right Dary, it is! The thing is I mentioned this to Rich a few days ago and he had no idea. I've seen other developers I've worked with not know about small things like this either. Figured I'd share.
The challenge though from Rich was to keep it under 40 words hence I could not mention that it has been around since version 7. Other functions work in a similar fashion like xmlValidate. You could say they are similar to the multi purpose functions in jQuery. Depending on the argument you give a function it will act accordingly.
Get ready for more though Dary. I'll be starting up a quick tips/thoughts series. :) More CF and Flex stuff on the way.
Posted on December 28, 2007 5:46 PM by Javier Julio
Migrating from TFS to SVN | Main | Is Touching Better?

Valid since CF 7, right Javier? Right?! :P
Posted on December 28, 2007 5:19 PM by Chris D