SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


XML Workshop V - Reading Values from XML Columns


XML Workshop V - Reading Values from XML Columns

Author
Message
jacob sebastian
jacob sebastian
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1044 Visits: 2523
Comments posted here are about the content posted at http://www.sqlservercentral.com/columnists/jSebastian/3117.asp

.
shahzadtariq
shahzadtariq
SSC Veteran
SSC Veteran (206 reputation)SSC Veteran (206 reputation)SSC Veteran (206 reputation)SSC Veteran (206 reputation)SSC Veteran (206 reputation)SSC Veteran (206 reputation)SSC Veteran (206 reputation)SSC Veteran (206 reputation)

Group: General Forum Members
Points: 206 Visits: 3

This workshop is really very helpful. I had no idea that how to read the xml stuff through query but now I am very much clear about it.

Is there any way to directly read from any xml file ?

or

Every time when there is a need to read xml stuff just load all the stuff in particular column then read it.

Any comments regarding my question will be appreciated.

thanks in advance


Asif Mehar
Asif Mehar
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 8
This workshop is very informative for me. I had read about XPath and using MSXML2.DOMDocument.4.0 object to read and XML File, but now I get data direct from DB.
Thanks.

Dear Shahzad, you can use "MSXML2.DOMDocument.4.0" for reading direct from any XML File, but you have to read about XPath before using this object

Asif Mehar
jacob sebastian
jacob sebastian
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1044 Visits: 2523

There is an execellent article by Robyn Page and Phil Factor at http://www.simple-talk.com/sql/t-sql-programming/rss-newsfeed-workbench/

The above article shows how to read a disk file using OPENROWSET + BULK



.
billm 56127
billm 56127
SSC Rookie
SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)

Group: General Forum Members
Points: 41 Visits: 8
How would I join the last cross apply TOutType(XOutType) with the @name attribute from TOut(XOut)?

See below. I am simply trying to lookup the output parameter node in the wsdl operation.



with xmlnamespaces(
'http://www.w3.org/2001/XMLSchema' as [xs],
'http://schemas.xmlsoap.org/wsdl/' as [wsdl],
'http://fwdco.com/api' as [tns]
)
select
XOut.value('(@name)', 'varchar(100)')
from
@wsdl.nodes('/wsdl:definitions/wsdl:portType/wsdl:operation[@name= sql:variable("@ApiCall")]') XTbl(XCol)
cross apply XCol.nodes('wsdl:input') as TIn(XIn)
cross apply XCol.nodes('wsdl:output') as TOut(XOut)
cross apply @wsdl.nodes('/wsdl:definitions/wsdl:types/xs:schema/xs:complexType[@name= ?? Ref XOut@Name?? )]') TOutType(XOutType)


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search