ColdFusion
  Home arrow ColdFusion arrow CFXML: Probing XMLDOM in ColdFusion
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
COLDFUSION

CFXML: Probing XMLDOM in ColdFusion
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 3
    2006-04-03

    Table of Contents:
  • CFXML: Probing XMLDOM in ColdFusion
  • Create a ColdFusion Object Using the Microsoft.XMLDOM Class
  • On accessing a structure
  • How do we get to the attributes?
  • How do we get at the Comment node?

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    CFXML: Probing XMLDOM in ColdFusion


    (Page 1 of 5 )

    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.

    Introduction

    Following the enormous success of AJAX, there has been a great deal of activity in probing the XMLDOM. In an earlier tutorial, accessing the XMLDOM using Javascript/ECMAScript was described. For an example XML file, a complete analysis of accessing the individual parts was presented using the DOM's structure.

    If you have a reference to an XML document, how do you access individual elements in ColdFusion? Well, this tutorial looks at this question using the same example file used in the previous tutorials. This tutorial shows two ways to access the individual elements of the XMLDOM object, referenced as an object and as a structured file. Also available are third party tools that do the XML parsing.

    The example XML File

    The xml file used in this tutorial, webstudents.xml, has a simple structure. It represents students taking a web programming class, with some information about their skills as shown below. It is a well formed XML file and does not have a schema, or a DTD. It is assumed that the example file is in a virtual directory and that the IIS server has been configured for the CF MX Server.

    <?xml version="1.0" encoding="ISO-8859-1" ?> 
    <wclass> 
    <!-- My students who attended my web programming class --> 
    <student id="1"> 
    <name>Linda Jones </name>  
    <legacySkill>Access, VB5.0 </legacySkill> 
    </student> 
    <student id="2"> 
    <name>Adam Davidson </name>  
    <legacySkill>Cobol, MainFrame </legacySkill> 
    </student> 
    <student id="3"> 
    <name>Charles Boyer </name>  
    <legacySkill>HTML, Photoshop </legacySkill> 
    </student> 
    <student id="4"> 
    <name>Charles Mann </name>  
    <legacySkill>Cobol, MainFrame </legacySkill> 
    </student> 
    </wclass> 

    More ColdFusion Articles
    More By Jayaram Krishnaswamy


       · The tutorial discusss two ways to access an XML document using ColdFusion. The...
     

    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...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    Stay green...Green IT