3 Replies Latest reply: Feb 16, 2015 5:51 PM by DataExploiter _ RSS

    Extract the data from XML file

    Venkata Ramana Paidi

      Hi ,

       

      I am trying to extract the data from XML file but I am not getting the values . I am getting the null values .

       

      This is the xml file I am using for extract the data.

       

      <?xml version="1.0" encoding="us-ascii"?>

      <!--Created with SAP Business Objects Disclosure Management http://www.sap.com-->

      <!--Copyright  2012 EDGAR Online, Inc. All Rights Reserved.-->

      <xbrl xmlns="http://www.xbrl.org/2003/instance" xmlns:comp="http://www.comp.com/20111231" xmlns:ifrs-full="http://xbrl.ifrs.org/taxonomy/2014-03-05/ifrs-full" xmlns:iso4217="http://www.xbrl.org/2003/iso4217" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:ubmfdts="http://www.ubmatrix.com/2005/function/dts" xmlns:xbrldi="http://xbrl.org/2006/xbrldi" xmlns:xbrli="http://www.xbrl.org/2003/instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xbrl.org/2006/xbrldi http://www.xbrl.org/2006/xbrldi-2006.xsd">

        <link:schemaRef xlink:href="IFRS_Extended%20taxonomy_V1/comp-20111231.xsd" xlink:type="simple" />

        <context id="FY2013December">

          <entity>

            <identifier scheme="http://SampleCompany.com">SampleCo</identifier>

          </entity>

          <period>

            <instant>2013-12-31</instant>

          </period>

        </context>

        <unit id="AED">

          <measure>iso4217:AED</measure>

        </unit>

        <ifrs-full:CurrentAssetsOtherThanAssetsOrDisposalGroupsClassifiedAsHeldForSaleOrAsHeldForDistributionToOwners contextRef="FY2013December">2218382</ifrs-full:CurrentAssetsOtherThanAssetsOrDisposalGroupsClassifiedAsHeldForSaleOrAsHeldForDistributionToOwners>

        <ifrs-full:CurrentTaxAssets contextRef="FY2013December">14265483</ifrs-full:CurrentTaxAssets>

        <ifrs-full:CurrentTaxAssets contextRef="FY2013December">1220872</ifrs-full:CurrentTaxAssets>

        <ifrs-full:Inventories contextRef="FY2013December">31295568</ifrs-full:Inventories>

        <ifrs-full:Assets>308296350.722031</ifrs-full:Assets>

        <ifrs-full:TradeAndOtherCurrentReceivables contextRef="FY2013December">186865840</ifrs-full:TradeAndOtherCurrentReceivables>

        <ifrs-full:OtherCurrentFinancialAssets contextRef="FY2013December">17478447</ifrs-full:OtherCurrentFinancialAssets>

        <ifrs-full:CashAndCashEquivalents contextRef="FY2013December" decimals="2" unitRef="AED">30771862</ifrs-full:CashAndCashEquivalents>

        <ifrs-full:InvestmentAccountedForUsingEquityMethod contextRef="FY2013December">2080157</ifrs-full:InvestmentAccountedForUsingEquityMethod>

        <ifrs-full:NoncurrentReceivables contextRef="FY2013December">6301961</ifrs-full:NoncurrentReceivables>

        <ifrs-full:OtherNoncurrentFinancialAssets contextRef="FY2013December">6438874</ifrs-full:OtherNoncurrentFinancialAssets>

        <ifrs-full:Goodwill contextRef="FY2013December">5751018</ifrs-full:Goodwill>

        <ifrs-full:InvestmentProperty contextRef="FY2013December">1138731</ifrs-full:InvestmentProperty>

        <ifrs-full:PropertyPlantAndEquipment contextRef="FY2013December">2469156</ifrs-full:PropertyPlantAndEquipment>

      </xbrl>

       

       

      I am trying to extract the values but I couldn't. I am creating the traps like <ifrs-full:InvestmentAccountedForUsingEquityMethod contextRef,<ifrs-full:CurrentTaxAssets contextRef so on.   After put the trap , it is highlight the corresponding rows only . But In the field values it is showing null values.

       

      I can extract the measure as iso4217:AED, period as 2013-12-31. But I cannot extract values from the <ifrs-full: tags information . In this tags I have xml tag reference data in double quotes .  Is any issue.  I am getting the null values from field values for this tag information.

      Please help me how to create the traps for xml and extract the data.

       

      Thanks & Regards,

      Ramana.

        • Re: Extract the data from XML file
          MelaSarenas _

          Hi Ramana,

           

          Extract first "<ifrs-full:" as your Detail template.  Then extract period and any other information above "<ifrs-full:" as an append.  For the "<ifrs-full:" line as your detail, I suggest you use floating trap so that you can capture the values together with the label.

           

          Hope this helps.

          Mela

          • Re: Extract the data from XML file
            Olly Bond

            Hi Ramana,

             

            You can have 20 or so templates apart from the Detail, in a mix of Appends and Footers as needed. It should be enough, but for a lot of XML files like SEPA payments and so on, there are more than 22 fields to trap. The good news is that there's nothing you can't read in Modeler - and with XML, the "preceding string" function in advanced field properties is really helpful. You'll need the Floating Trap if you use lots of templates, but you might be able to avoid this and use extract(Textline(field;n);">";"<") to get at what you need.

             

            I'm sorry that we can't build models for free, but if you are stuck and have a real challenge, we'd be happy to give you a quote to fix it.

             

            Best wishes,

             

            Olly

            • Re: Extract the data from XML file
              DataExploiter _

              Hi Ramana, A few thoughts, yes you can get all the values in the XML file. There are multiple ways to trap and extract the data. If it’s this one file or a few files as you know XML can be opened in Excel. If it’s tens of hundreds of files, you can consolidate as one file before opening. From the Start screen type cmd and press enter, then at the dos prompt copy *.xml all.xml to create one file to work. Try applying your Monarch model to all.xml or you may try to open in Excel to parse the data. Monarch is the best approach. I scrap the internet for thousand of these EDGAR financial files and others. Monarch enables me to work and transform tens of thousands of financial related files into usable data. There are so many ways to approach your need for data locked in xml. Because I’ve read this forum for years and worked with Monarch countless more years I want to make a recommendation. If this is an important project and not just one or two files I highly suggest having Olly Bond create reusable models and suggestions for the best approach. No I don’t live in Europe, never met Olly but have seen his contributions on this board. So I can recommend money well spent for the best solution. http://www.monarchexperts.com/ Good luck John