SQL Server Central is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
Search:  
 
 

Methods for Parsing XML files

By Jon Winer, 2002/06/20

Total article views: 13638 | Views in the last 30 days: 38
Methods for Parsing XML files
     As we all know, in coding, there are many ways to get the same job done. In my experimentation with XML, I have run across many instances where this scenario is clearly true. Although some methods are grossly better than others, they all have a place in our programming repertoire depending on the circumstance. Take a look at some examples.

This example uses the selectSingleNode method to access the value of each node.
This example uses the getElementsByTagName method to create a node list for each node name group. Then parses the xml file by iterating through each node list.
This example uses the getElementsByTagName method to create a 'parent' node list, then accesses each child node based on its index.
This example uses the getElementsByTagName method to create a 'parent' node list, then iterates through its child nodes and returns the node value and name.


For additional articles, please feel free to visit my homepage. Have questions, email me at jwiner1@cfl.rr.com

By Jon Winer, 2002/06/20

Total article views: 13638 | Views in the last 30 days: 38
Your response
 
 
Related tags

Basics     Programming    
Miscellaneous     XML    
 
Like this? Try these...

Usp_GetProcByText

(not yet rated) | 36 reads

Usp_GetObjByColumName

(not yet rated) | 35 reads
Already registered?  

Free registration required

To read the rest of this article, and access thousands of other articles, we ask you to register on the site and subscribe to our newsletters.

Register

E-mail address:
Password:
Password (confirm):

  

Subscriptions

We ask you to register on the site and subscribe to our newsletters. Subscribing to our newsletters gets you:

  • ALL of our content (thousands of articles, scripts, and forum postings)
  • A daily newsletter (example)
  • A weekly news round up (example)
  • The opportunity to ask and answer questions in our forums
  • A daily Question of the Day to test and help you increase your knowledge of SQL Server.

We ask that you give the newsletter a try for a week. Over 200,000 SQL Server Professionals a day find it entertaining and useful. If not, you are welcome to unsubscribe at anytime.

Steve Jones
Editor, SQLServerCentral.com