Wrox Programmer Forums
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 6th, 2008, 02:40 AM
Authorized User
 
Join Date: Mar 2004
Posts: 74
Thanks: 0
Thanked 0 Times in 0 Posts
Default parse xml data

I have a xml data passed to the stored procedure like below
<root>
      <id>1</id><firstname>john</firstname><lastname>doe</lastname>
</root>. I tried parsing it using node() method but it only works for
one node. I used the following code
select
    person.id.value('.', 'int') as personID
from
    @xml.nodes('/root/id') as person(id)

my question is what do i need to do to return all the three node values at once.

thanks for sugguestions.





Similar Threads
Thread Thread Starter Forum Replies Last Post
used JScript to parse xml data kri_hegde Javascript How-To 1 July 24th, 2007 02:38 PM
Parse XML in ASP delaneyp Classic ASP XML 1 February 6th, 2006 08:42 AM
Parse XML response atulb XML 1 October 30th, 2005 07:05 AM
about XML receive by tomcatand XML parse by java taianmhzy Servlets 0 May 20th, 2004 01:59 AM
about XML receive ang XML parse by tomcat taianmhzy Apache Tomcat 0 May 20th, 2004 01:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.