Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

parsing an xml file with coldfusion

Posted on 2005-03-02
5
Medium Priority
?
244 Views
Last Modified: 2013-12-24
does cold fusion have functions that allow you to parse through an .xml file?
0
Comment
Question by:Judy Deo
  • 3
5 Comments
 
LVL 17

Accepted Solution

by:
Tacobell777 earned 1600 total points
ID: 13445538
Yes, what are you looking for?

<cfscript>
parsedXML = xmlParse( xmlString );
</cfscript>
0
 
LVL 17

Assisted Solution

by:Tacobell777
Tacobell777 earned 1600 total points
ID: 13445562
<cfxml variable="xmlString">
<root><child test="test">text</child></root>
</cfxml>

<cfscript>
parsedXML = xmlParse( xmlString );
</cfscript>

<cfoutput>#parsedXML.xmlRoot.child.xmlAttributes.test#</cfoutput>

<cfdump var="#parsedXML#">
0
 

Author Comment

by:Judy Deo
ID: 13445575
how do i load the contents of the .xml file into that xmlString variable you mentioned.
0
 
LVL 17

Assisted Solution

by:Tacobell777
Tacobell777 earned 1600 total points
ID: 13445648
<cffile action="read" file="yourfile" variable="xmlString" >
0
 
LVL 12

Assisted Solution

by:mmc98dl1
mmc98dl1 earned 400 total points
ID: 13445879
Tacobell mentions all the right things, take a read of the MM Livedocs - http://livedocs.macromedia.com/coldfusion/7/htmldocs/00001505.htm#1158596 

and the cfml tag info:
http://livedocs.macromedia.com/coldfusion/7/htmldocs/00000352.htm#wp2497244 
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question