You must Sign In to post a response.
  • Category: XML

    Convert schema file into text file

    Hi,


    I have a schema file and i want to convert that schema into text file with comma separator.


    <xs:simpleType>
    <xs:restriction base="xs:integer">
    <xs:totalDigits value="3"/>
    <xs:minInclusive value="1"/>
    <xs:maxInclusive value="999"/>
    </xs:restriction>
    </xs:simpleType>


    Output:

    "integer,3,1,999"


    If that is reference type then based on reference text we need to get that referenced values.

    <xs:complexType name="web-interface">
    <xs:sequence>
    <xs:element name="group-tin" type="tns:tin"/>
    </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="tin">
    <xs:restriction base="xs:string">
    <xs:maxLength value="9"/>
    <xs:pattern value="[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]"/>
    </xs:restriction>
    </xs:simpleType>

    Output:


    " web-interface,tin, string,9,[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]".



    Any one give me some suggestion to perform this task...
  • #744359
    Refer this sample code given on the article where you can read the XML file and can create the CSv file.



    csvreader.com/code/cs/xml_to_csv.php

    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM

  • #748253
    refer

    http://www.codeproject.com/Questions/140814/XML-to-CSV

    hope it helps and give you some other manipulation ideas as well

    Cheers


  • Sign In to post your comments