stored procedure

  • Can anyone write me the stored procedure for the following XML file??

     

     

    <?

    xml version="1.0" encoding="utf-8" ?>

    <

    xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <

    xs:simpleType name="clliType">

    <xs:restriction base="xs:string">

    <xs:pattern value="([A-Z0-9 -])*" />

    <xs:minLength value="8" />

    <xs:maxLength value="11" />

    </xs:restriction>

    </

    xs:simpleType>

     

    <

    xs:complexType name="requestType" >

    <

    xs:sequence>

    <xs:element name="Clli" type="clliType" />

    </

    xs:sequence>

    </

    xs:complexType>

    <

    xs:element name="Request" type="requestType" />

    <

    xs:element name="Response">

    <xs:complexType>

    <xs:sequence>

    <xs:element name="Request" type="requestType" />

    <xs:element name="StatusHeader" >

    <xs:complexType>

    <xs:sequence>

    <!--

    StatusCode = 0 -

    > Success

    StatusCode = negative ->Failure with corresponding description

    -->

    <xs:element name="StatusCode" type="xs:integer" />

    <xs:element name="StatusDescription" type="xs:string" />

    </xs:sequence>

    </xs:complexType>

    </xs:element>

    <xs:element name="ClliResponse" minOccurs="0" >

    <xs:complexType>

    <xs:sequence>

    <xs:element name="Address" type="xs:string" minOccurs="0" />

    <xs:element name="Latitude" type="xs:string" minOccurs="0" />

    <xs:element name="Longitude" type="xs:string" minOccurs="0" />

    <xs:element name="Vertical" type="xs:string" minOccurs="0" />

    <xs:element name="Horizontal" type="xs:string" minOccurs="0" />

    </xs:sequence>

    </xs:complexType>

    </xs:element>

    </xs:sequence>

    </xs:complexType>

    </

    xs:element>

    </

    xs:schema>

  • Hmmmm. The requirements seem a little vague.  I'll make the assumption that this XML stream, or the XML stream it describes, should be an input argument into a stored procedure.  What would you like that procedure to do?

    Or do you just need an example of how to open and work with an XML document in a stored proc?  Here's a good starting point:

    http://msdn.microsoft.com/msdnmag/issues/05/06/DataPoints/

     


    And then again, I might be wrong ...
    David Webb

  • From the 'clli' in the request schema, i have to retrieve the Address,latitude,longitude,vertical and horizontal from the response schema. Do not worry about the status code.

     

     

Viewing 3 posts - 1 through 2 (of 2 total)

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