XML Workshop V - Reading Values from XML Columns

  • Comments posted here are about the content posted at http://www.sqlservercentral.com/columnists/jSebastian/3117.asp

    .

  • 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

  • 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

  • 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

     

    .

  • 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)

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply