XML Conversion

  • Hi All,

    One of my system generating a CONNECTION DATA RECORD (.xml extension) with 1000s lines like the ones given below.And the vendor of the system gave me SCHEMA file (XML Extenion).And a File with XSD Extension.I have attached that as attachment.

    I am looking for a tool to convert this XML File to CSV Format.

    And also a command line tool for the same purpose.

    Please provide your reciommendations.

    CONNECTION DATA RECORD

    *********************

    <NexusDataRecord><SMS_CDR version="1.4" sequenceNumber="209166705"><Id>45824079985</Id><Number><B>978895583220</B></Number><Time><FirstActivity>1258463045.174</FirstActivity><Setup>1258463045.174</Setup><Elapsed>37172</Elapsed><LastActivity>1258463082.346</LastActivity><Portion><Clear>1258463082.346</Clear></Portion></Time><CLRInfo><CLR><CLR_TYPE>DTAP SMS MO</CLR_TYPE><Time><FirstActivity>1258463045.174</FirstActivity><Setup>1258463045.174</Setup><Clear>1258463082.346</Clear><LastActivity>1258463082.346</LastActivity></Time><GlobalTitle></GlobalTitle><PointCode><OPC>221</OPC><DPC>7751</DPC></PointCode><ExchCC></ExchCC><TransactId></TransactId><SubsystemNumber></SubsystemNumber><NI>2</NI><DNI>2</DNI><TMSI>2885909022</TMSI><IMEISV>4423560136837812</IMEISV><CGI><NEW><MCCMNC>97160</MCCMNC><LAC>20116</LAC><CI>22451</CI></NEW></CGI></CLR></CLRInfo></SMS_CDR></NexusDataRecord>

    SCHEMA FILE

    **********

    <NexusDataConfiguration>

    <!-- Replace ConnectionConfiguration with valid entries -->

    <!--<ConnectionConfiguration>

    <authentication>

    <user>user</user>

    <salt>0.0</salt>

    <auth_hash></auth_hash>

    </authentication>

    <compression level="best_speed">gzip</compression>

    <encryption>

    <algorithm>desede</algorithm>

    </encryption>

    </ConnectionConfiguration>-->

    <SMS_CDR version="1.4">

    <Id enable="true"/>

    <Number enable="true">

    <A enable="true"/>

    <B enable="true"/>

    </Number>

    <Clearing enable="true"/>

    <Time enable="true">

    <FirstActivity enable="true"/>

    <Setup enable="true"/>

    <Elapsed enable="true"/>

    <LastActivity enable="true"/>

    <Portion enable="true">

    <Clear enable="true"/>

    </Portion>

    </Time>

    <CLRInfo enable="true">

    <CLR enable="true">

    <CLR_TYPE enable="true"/>

    <Time enable="true">

    <FirstActivity enable="true"/>

    <Setup enable="true"/>

    <Clear enable="true"/>

    <LastActivity enable="true"/>

    </Time>

    <GlobalTitle enable="true">

    <A_GT enable="true"/>

    <B_GT enable="true"/>

    </GlobalTitle>

    <PointCode enable="true">

    <OPC enable="true"/>

    <DPC enable="true"/>

    </PointCode>

    <ExchCC enable="true">

    <OCC enable="true"/>

    <DCC enable="true"/>

    </ExchCC>

    <TransactId enable="true">

    <Orig enable="true"/>

    <Dest enable="true"/>

    </TransactId>

    <SubsystemNumber enable="true">

    <ASSN enable="true"/>

    <BSSN enable="true"/>

    </SubsystemNumber>

    <NI enable="true"/>

    <DNI enable="true"/>

    <TMSI enable="true"/>

    <IMSI enable="true"/>

    <IMEI enable="true"/>

    <IMEISV enable="true"/>

    <CGI enable="true">

    <NEW enable="true">

    <MCCMNC enable="true"/>

    <LAC enable="true"/>

    <SAC enable="true"/>

    <CI enable="true"/>

    </NEW>

    </CGI>

    <CauseValue enable="true"/>

    <MSISDN enable="true"/>

    <SMSCaddr enable="true"/>

    <MSCaddr enable="true"/>

    </CLR>

    </CLRInfo>

    </SMS_CDR>

    </NexusDataConfiguration>

  • SSIS is pretty good at converting data from one format to another. Any reason to not just use that?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Hi,

    Frankly I dont have much knowkledge in SQL.

    I have a small server running on 2008-Express edition.

    So I am not sure whether SSIS is there or not.

    If you can guide me then I can check it immdly and try to do the method you advise.

    Rgds

    Sunil

  • I don't think Express comes with SSIS.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Hi All,

    Anybbody used "http://www.altova.com/mapforce.html" tools ?

    Rgds

    Sunil

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

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