?
Solved

parsing an xml file with coldfusion

Posted on 2005-03-02
5
Medium Priority
?
235 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

Question has a verified solution.

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

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
Suggested Courses

764 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