You are here: Re: Getting all nodes and node details from xml using xquery « MsSQL Server « IT news, forums, messages
Re: Getting all nodes and node details from xml using xquery

Posted by esquel on 04/12/06 00:10

"Shilpa" <shilpa.nagavara@unisys.com> writes:
>I haev the following code:
>
>DECLARE @x xml
>SET @x='
><Root>
> <row id="1"><name>Larry</name><oflw>some text</oflw></row>
> <row id="2"><name>Joe</name></row>
> <row id="3" />
></Root>
>'
>exec sp_xml_preparedocument @idoc OUTPUT, @x
>SELECT * FROM OPENXML(@idoc, '/Root')
>
>This gives the following details
>id
>parentid
>nodetype localname
>
>prefix
>
>namespaceuri
> datatype
>
> prev text


I inquired about this, and you can only get localname, namespace URI
and the node's value with XQuery. You cannot get the positional node
information or node ids or prefixes.

For an example, look up the newsgroup microsoft.public.sqlserver.xml.
Michael Rys, who is the Program Manager for XML in SQL Server, and
whom I got this information from, says he recently posted an example
to that group.

--
Erland Sommarskog, Stockholm, esquel@sommarskog.se

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация