|
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
[Back to original message]
|