Home arrow ColdFusion arrow Page 3 - CFXML: Probing XMLDOM in ColdFusion
COLDFUSION

CFXML: Probing XMLDOM in ColdFusion


This tutorial examines how to access the individual elements of an XML document in ColdFusion, if you have a reference to that document. Two ways to access the individual elements are demonstrated.

Author Info:
By: Jayaram Krishnaswamy
Rating: 5 stars5 stars5 stars5 stars5 stars / 16
April 03, 2006
TABLE OF CONTENTS:
  1. · CFXML: Probing XMLDOM in ColdFusion
  2. · Create a ColdFusion Object Using the Microsoft.XMLDOM Class
  3. · On accessing a structure
  4. · How do we get to the attributes?
  5. · How do we get at the Comment node?

print this article
SEARCH DEVARTICLES

CFXML: Probing XMLDOM in ColdFusion - On accessing a structure
(Page 3 of 5 )


What if you want to access the structure as a whole? No problem; by using the <cfdump> tag,we can get the structure of the required elements. Review the following code and its display for the "children" of the root element.

<cffile action="read" file="C:\Inetpub\wwwroot\webstudents.xml"
variable="xmldoc">
<cfset mydoc = XmlParse(xmldoc)>
<cfset rootchild=#mydoc.XMLRoot.XMLChildren#>
<cfdump var="#rootchild#"> 

The next picture shows the structure with the "element" details collapsed and the picture that follows shows it with one (the fourth) of the "xml elements" expanded. By clicking on the xml element row in the browser display you can expand or collapse the nodes.


The 4th xml element node expanded view.


blog comments powered by Disqus
COLDFUSION ARTICLES

- Adobe ColdFusion Just Got More RAD
- How to Access a SQL Anywhere Database with C...
- CFXML: Probing XMLDOM in ColdFusion
- Creating a Web Service with ColdFusion: the ...
- CFAjax: What it is and How to Use it
- Querying SQL 2000 Server from ColdFusion
- Introduction to ColdFusion Markup Language, ...
- Introduction to ColdFusion Markup Language
- Databases and Dreamweaver MX 2004, concluded
- Databases and Dreamweaver MX 2004
- Welcome to Coldfusion MX 6.1, concluded
- Welcome to Coldfusion MX 6.1
- What You Must Know About ColdFusion Flow-Con...
- What You Must Know About Operators in ColdFu...
- Everything You Must Know About ColdFusion Va...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials