How to export group from tally in XML format? - tally

How to export group from tally in XML format?
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>Export</TALLYREQUEST>
<TYPE>Collection</TYPE>
<ID>Groups</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVEXPORTFORMAT>SysName:XML</SVEXPORTFORMAT>
<SVCURRENTCOMPANY>TEST COMPANY</SVCURRENTCOMPANY>
</STATICVARIABLES>
<TDL>
<TDLMESSAGE>
<COLLECTION ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No" NAME="Ledgers">
<TYPE>Group</TYPE>
<NATIVEMETHOD>*</NATIVEMETHOD>
</COLLECTION>
</TDLMESSAGE>
</TDL>
</DESC>
</BODY>
</ENVELOPE>
I tried by using above mentioned code. But its response looks like below:
<DATA><COLLECTION ISMSTDEPTYPE="Yes" MSTDEPTYPE="4"> </COLLECTION></DATA>

Your collection Name is wrong
<ID>Groups</ID>
should match with collection Name you are sending in TDLMESSAGE else that collection should exist in Tally
Since You are creating custom collection ,It must match with collection name in TDLMESSAGE
Change From
<COLLECTION ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No" NAME="Ledgers">
To
<COLLECTION ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No" NAME="Groups">

Related

How to export list of all ledgers which is under sundry debitors from tally using xml

I want to export list of all ledgers which is under sundry debitors from tally using xml.
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>Export</TALLYREQUEST>
<TYPE>Collection</TYPE>
<ID>Ledgers</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVEXPORTFORMAT>SysName:XML</SVEXPORTFORMAT>
</STATICVARIABLES>
<TDL>
<TDLMESSAGE>
<COLLECTION ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No" NAME="Ledgers">
<TYPE>Ledger</TYPE>
<CHILDOF>$$GroupSundryDebtors</CHILDOF>
<BELONGSTO>Yes</BELONGSTO>
<NATIVEMETHOD>*/NATIVEMETHOD>
</COLLECTION>
</TDLMESSAGE>
</TDL>
</DESC>
</BODY>
</ENVELOPE>
By mentioning type as Ledger:Group we can filter ledgers based on group by mentioning groupname in childof tag
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>Export</TALLYREQUEST>
<TYPE>Collection</TYPE>
<ID>Ledgers</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
<!-- * Supports only xml format -->
<SVFROMDATE TYPE="Date">{{Fromdate}}</SVFROMDATE>
<SVTODATE TYPE="Date">{{ToDate}}</SVTODATE>
</STATICVARIABLES>
<TDL>
<TDLMESSAGE>
<COLLECTION ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No" NAME="Ledgers">
<TYPE>Ledger:Group</TYPE>
<Childof>Sundry Debtors</Childof>
<NATIVEMETHOD>Address</NATIVEMETHOD>
<!-- * will fetch all fields if you want specific fields you can specify -->
<NATIVEMETHOD>Name,Parent,*</NATIVEMETHOD>
</COLLECTION>
</TDLMESSAGE>
</TDL>
</DESC>
</BODY>
</ENVELOPE>

Intuit QBO Reports API -- What's the full qzurl URL?

The documentation for the Intuit Partner Platform (IPP) QBO v3 API for reports (such as this one for a Balance Sheet) refers to very promising-looking elements called Quick-Zoom URLs (discussed near the bottom of the doc page I linked to).
When you run the report, you get an href element like this (redacted) one:
{u'href': u'ProfitAndLossDetail?token=PANDL_DET&parenttoken=PANDL&crit=accounttype%3D10..14%3Bhigh_date%3D03%2F31%2F2015%3Bnopost%3Dfalse%3Baccount%3Dmx%2C3%2C8%2C20%2C19%2C10%2C36%2C24%2C6%2C21%2C34%2C15%2C193%2C51%2C32%2C26%2C33163%2C77%2C62%2%2C86%2C107%2C60%2C79%2C166%%2C82%2C186%2C108%2C54%2C190%2C101%2C95%2C136%2C71%2C64%3Blow_date%3D01%2F01%2F2015%000740743&groupby=%28Account%2FAccountTypeID%2CAccount%2FOrderName%2CKlass%2FOrderName', u'value': u'53.90'}
What's the full URL I'd construct to actually follow the link?
EDIT: To clarify, I am already able to run the balance sheet report with the qzurl links. What I need help with is building and following the Quick Zoom URLs themselves; the things in the response that are the qzruls...how do I follow those?
You can try all QBO V3 Reports using ApiExplorer.
https://developer.intuit.com/v2/apiexplorer?apiname=V3QBO#?id=Reports
If call these APIs programmatically please feel free to use IDG provided java/C#/php SDKs.
According docs,
Sandbox Base URL to use with development keys: https://sandbox-quickbooks.api.intuit.com/v3
Production Base URL to use with production keys: https://quickbooks.api.intuit.com/v3​
Operation: GET /company/companyId/reports/BalanceSheet?name=value[&...]
Edit Adding Request URL and response [ condition : qzurl=true ]
Request URI : https://quickbooks.api.intuit.com/v3/company/1368908040/reports/BalanceSheet?qzurl=true&requestid=3434534&minorversion=1&
Response -
<?xml version="1.0" encoding="UTF-8"?>
<Report xmlns="http://schema.intuit.com/finance/v3">
<Header>
<Time>2015-05-04T14:28:14-07:00</Time>
<ReportName>BalanceSheet</ReportName>
<ReportBasis>Accrual</ReportBasis>
<StartPeriod>2015-01-01</StartPeriod>
<EndPeriod>2015-05-05</EndPeriod>
<SummarizeColumnsBy>Total</SummarizeColumnsBy>
<Currency>INR</Currency>
<Option>
<Name>AccountingStandard</Name>
<Value>IFRS</Value>
</Option>
<Option>
<Name>NoReportData</Name>
<Value>false</Value>
</Option>
</Header>
<Columns>
<Column>
<ColTitle />
<ColType>Account</ColType>
</Column>
<Column>
<ColTitle>Total</ColTitle>
<ColType>Money</ColType>
</Column>
</Columns>
<Rows>
<Row type="Section" group="TotalAssets">
<Header>
<ColData value="Assets" />
<ColData value="" />
</Header>
<Rows>
<Row type="Section" group="OtherCurrentAssets">
<Header>
<ColData value="Current Assets" />
<ColData value="" />
</Header>
<Rows>
<Row type="Data">
<ColData value="Inventory Asset" id="83" />
<ColData value="0.00" href="QZReport?token=GENERIC_QZREPORT&crit=high_date%3D05%2F05%2F2015%3Bnopost%3Dfalse%3Baccount%3Dmx%2C83%3Blow_date%3D01%2F01%2F2015&parenttoken=BAL_SHEET&cumulative=yes&groupby=%28Account%2FAccountTypeID%2CAccount%2FOrderName" />
</Row>
<Row type="Section" group="AR">
<Header>
<ColData value="Accounts receivable (Debtors)" />
<ColData value="" />
</Header>
<Rows>
<Row type="Data">
<ColData value="Accounts Receivable (Debtors)" id="86" />
<ColData value="4299.00" href="QZReport?token=GENERIC_QZREPORT&crit=high_date%3D05%2F05%2F2015%3Bnopost%3Dfalse%3Baccount%3Dmx%2C86%3Blow_date%3D01%2F01%2F2015&parenttoken=BAL_SHEET&cumulative=yes&groupby=%28Account%2FAccountTypeID%2CAccount%2FOrderName" />
</Row>
</Rows>
<Summary>
<ColData value="Total Accounts receivable (Debtors)" />
<ColData value="4299.00" href="QZReport?token=GENERIC_QZREPORT&crit=high_date%3D05%2F05%2F2015%3Bnopost%3Dfalse%3Baccount%3D86%3Blow_date%3D01%2F01%2F2015&parenttoken=BAL_SHEET&cumulative=yes&groupby=%28Account%2FAccountTypeID%2CAccount%2FOrderName" />
</Summary>
</Row>
</Rows>
<Summary>
<ColData value="Total Current Assets" />
<ColData value="4299.00" href="QZReport?token=GENERIC_QZREPORT&crit=high_date%3D05%2F05%2F2015%3Bnopost%3Dfalse%3Baccount%3D78%2C66%2C83%2C12%2C79%2C4%2C59%2C85%2C7%2C86%3Blow_date%3D01%2F01%2F2015&parenttoken=BAL_SHEET&cumulative=yes&groupby=%28Account%2FAccountTypeID%2CAccount%2FOrderName" />
</Summary>
</Row>
</Rows>
<Summary>
<ColData value="Total Assets" />
<ColData value="4299.00" href="QZReport?token=GENERIC_QZREPORT&crit=high_date%3D05%2F05%2F2015%3Bnopost%3Dfalse%3Baccount%3D78%2C66%2C83%2C12%2C79%2C4%2C59%2C85%2C7%2C86%2C5%2C6%2C8%2C10%2C11%2C13%3Blow_date%3D01%2F01%2F2015&parenttoken=BAL_SHEET&cumulative=yes&groupby=%28Account%2FAccountTypeID%2CAccount%2FOrderName" />
</Summary>
</Row>
<Row type="Section" group="TotalLiabilitiesAndEquity">
<Header>
<ColData value="Liabilities and Equity" />
<ColData value="" />
</Header>
<Rows>
<Row type="Section" group="Equity">
<Header>
<ColData value="Equity" />
<ColData value="" />
</Header>
<Rows>
<Row type="Data">
<ColData value="Opening Balance Equity" id="84" />
<ColData value="0.00" href="QZReport?token=GENERIC_QZREPORT&crit=high_date%3D05%2F05%2F2015%3Bnopost%3Dfalse%3Baccount%3Dmx%2C84%3Blow_date%3D01%2F01%2F2015&parenttoken=BAL_SHEET&cumulative=yes&groupby=%28Account%2FAccountTypeID%2CAccount%2FOrderName" />
</Row>
<Row type="Data">
<ColData value="Retained Earnings" id="2" />
<ColData value="" />
</Row>
<Row type="Data" group="NetIncome">
<ColData value="Profit for the year" />
<ColData value="4299.00" href="ProfitAndLoss?token=PANDL&parenttoken=BAL_SHEET&crit=high_date%3D05%2F05%2F2015%3Bnopost%3Dfalse%3Baccount%3D*%3Blow_date%3D01%2F01%2F2015&cumulative=yes&groupby=%28Account%2FAccountTypeID%2CAccount%2FOrderName" />
</Row>
</Rows>
<Summary>
<ColData value="Total Equity" />
<ColData value="4299.00" />
</Summary>
</Row>
</Rows>
<Summary>
<ColData value="Total Liabilities and Equity" />
<ColData value="4299.00" />
</Summary>
</Row>
</Rows>
</Report>
Edit -
Add the qzURL at then end of the following BASE URL and use OAuth tokens to call this endpoint.
For ex -
https://quickbooks.api.intuit.com/v3/company//reports/QZReport?token=GENERIC_QZREPORT&crit=high_date%3D07%2F05%2F2015%3Bnopost%3Dfalse%3Baccount%3Dmx%2C86%3Blow_date%3D01%2F01%2F2015&parenttoken=BAL_SHEET&cumulative=yes&groupby=%28Account%2FAccountTypeID%2CAccount%2FOrderName
Assume the quickzoom url will be as follows-
"QZReport?token=GENERIC_QZREPORT&crit=high_date%3D07%2F14%2F2014%3Bnopost%3Dfalse%3Baccount%3Dmx%2C41%3Blow_date%3D01%2F01%2F2014&groupby=%28Account%2FAccountTypeID%2CAccount%2FOrderName"
1.Client will first send a request to know all the customization attributes supported for a QZReport .Request will also contain all the filtering criteria or attrobutes set.From above url the request will look like this.
https://quickbooks.api.intuit.com/v3/company/1368908040/customize?report=QZReport&high_date=07/14/2014&group_by=Acccount
Response of this request will be all customization attributes available for the QZReport or transaction report .
eg:{
reportName : "TranscationList"
params:
{
start_date:"",
end_date:"2014-07-14",
date_macro:"Today,YesterDay,ThisYear......"
account:"1,2,3,4,",
.... }
}

XSLT1.0 Add child element only once if does not exist

I am trying to add an element called Stamping one time and only if it doesn't exist in the message.
<!-- Copy all other elements -->
<xsl:template match="#*|node()">
<xsl:copy>
<xsl:apply-templates select="#*|node()" />
</xsl:copy>
<xsl:template match="/*[local-name()='Envelope']/*[local-name()='Body']/*/*[not(*[local-name()='Stamping'])]">
<xsl:copy>
<xsl:apply-templates select="#*|node()" />
</xsl:copy>
<v1:Stamping>
<v2:UserData CityCode="NO Stamping" Role="User" SecurityId="55"/>
</v1:Stamping>
</xsl:template>
My problem occurs because the new v1:Stamping value is repeated for every child like this based on my existing match:
<envelope>
<body>
<operationName>
<child1 Catalog="1" />
<v1:Stamping>
<v2:UserData CityCode="NO Stamping" Role="User" SecurityId="55"/>
<v1:Stamping>
<child2 Catalog="2" />
<v1:Stamping>
<v2:UserData CityCode="NO Stamping" Role="User" SecurityId="55"/>
</v1:Stamping>
</operationName>
</body>
</envelope>
I need to see the result where stamping is only added one time as a child element of operationName. operationName is an element that will exist but this XSLT will be applied across many services and the value in operationName will be different depending on the service where this XSLT will be applied. This example below would be the needed output.
<envelope>
<body>
<operationName>
<child1 Catalog="1" />
<child2 Catalog="2" />
<v2:UserData CityCode="NO Stamping" Role="User" SecurityId="55"/>
</operationName>
</body>
</envelope>
I need to see the result where stamping is only added one time as a
child element of operationName.
Then write a template especially for operationName elements:
<xsl:template match="operationName">
and check whether v1:Stamping already exists as one of its children:
<xsl:if test="not(v1:Stamping)">
If it does not exist already, it is added to the output tree.
Assuming the following XML, where there is no v1:Stamping element, as input:
XML Input
<?xml version="1.0" encoding="UTF-8"?>
<envelope>
<body>
<operationName>
<child1 Catalog="1"/>
<child2 Catalog="2"/>
</operationName>
</body>
</envelope>
Stylesheet
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
xmlns:v1="http://www.v1.com" xmlns:v2="http://www.v2.com">
<xsl:output method="xml" encoding="UTF-8" indent="yes" />
<xsl:strip-space elements="*"/>
<xsl:template match="#*|node()">
<xsl:copy>
<xsl:apply-templates select="#*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="operationName">
<xsl:copy>
<xsl:apply-templates select="#*|node()"/>
<xsl:if test="not(v1:Stamping)">
<v1:Stamping>
<v2:UserData CityCode="NO Stamping" Role="User" SecurityId="55"/>
</v1:Stamping>
</xsl:if>
</xsl:copy>
</xsl:template>
</xsl:transform>
XML Output
<?xml version="1.0" encoding="UTF-8"?>
<envelope>
<body>
<operationName>
<child1 Catalog="1"/>
<child2 Catalog="2"/>
<v1:Stamping xmlns:v1="http://www.v1.com" xmlns:v2="http://www.v2.com">
<v2:UserData CityCode="NO Stamping" Role="User" SecurityId="55"/>
</v1:Stamping>
</operationName>
</body>
</envelope>

Invoice is missing the "TotalAmt" field

We are using the Intuit API V2 to import Invoices from QuickBooks Online.
We expect the "TotalAmt" field to be present on all the invoices.
There are a couple of invoices that at one point in the past had the "TotalAmt" present but now the "TotalAmt" field is missing and the "Balance" is equal to 0.
Is this a bug or expected behavior?
Edit: this is one of the responses we got from the QuickBooks API (I changed only the indentation and replaced real data with 3 dots):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Invoice xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:qbo="http://www.intuit.com/sb/cdm/qbo" xmlns:qbp="http://www.intuit. com/sb/cdm/qbopayroll/v1">
<Id idDomain="QBO">36673</Id>
<SyncToken>1</SyncToken>
<MetaData>
<CreateTime>2013-04-10T15:24:03-07:00</CreateTime>
<LastUpdatedTime>2013-04-11T08:32:11-07:00</LastUpdatedTime>
</MetaData>
<Header>
<DocNumber>...</DocNumber>
<TxnDate>2013-04-10-07:00</TxnDate>
<Note>...</Note>
<CustomerId idDomain="QBO">464</CustomerId>
<ToBePrinted>true</ToBePrinted>
<ToBeEmailed>false</ToBeEmailed>
<SalesTermId idDomain="QBO">1</SalesTermId>
<DueDate>2013-04-10-07:00</DueDate>
<BillAddr>
<Line1>...</Line1>
<City>...</City>
<CountrySubDivisionCode>...</CountrySubDivisionCode>
<PostalCode>...</PostalCode>
<Tag>CUSTOMER</Tag>
</BillAddr>
<ShipAddr>
<Line1>...</Line1>
<City>...</City>
<CountrySubDivisionCode>...</CountrySubDivisionCode>
<PostalCode>...</PostalCode>
<Tag>CUSTOMER</Tag>
</ShipAddr>
<ShipMethodId idDomain="QBO"/>
<Balance>0.00</Balance>
<DiscountTaxable>true</DiscountTaxable>
</Header>
<Line>
<Desc>...</Desc>
<Taxable>false</Taxable>
<ItemId idDomain="QBO">5</ItemId>
<UnitPrice>450</UnitPrice>
<Qty>1</Qty>
</Line>
</Invoice>
<Balance>0.00</Balance>
It indicates the amount associated with that invoice is 0. In this case, response XML doesn't include any "TotalAmt" field.
There can be couple of cases where 'TotalAmt' doesn't get included.
1.
I had created an invoice with amount as 0. PFB that invoice record in QBO and the corresponding response XML.
<Invoice xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:qbp="http://www.intuit.com/sb/cdm/qbopayroll/v1" xmlns:qbo="http://www.intuit.com/sb/cdm/qbo">
<Id idDomain="QBO">50</Id>
<SyncToken>0</SyncToken>
<MetaData>
<CreateTime>2013-07-01T01:59:37-07:00</CreateTime>
<LastUpdatedTime>2013-07-01T01:59:37-07:00</LastUpdatedTime>
</MetaData>
<Header>
<DocNumber>1016</DocNumber>
<TxnDate>2013-07-01-07:00</TxnDate>
<CustomerId idDomain="QBO">6</CustomerId>
<ToBePrinted>false</ToBePrinted>
<ToBeEmailed>true</ToBeEmailed>
<SalesTermId idDomain="QBO">3</SalesTermId>
<DueDate>2013-07-31-07:00</DueDate>
<BillAddr>
<Line1>Park Avenue NY</Line1>
...
</BillAddr>
<ShipAddr>
<Line1>Park Avenue NY</Line1>
...
</ShipAddr>
<BillEmail>john_doe#digitalinsight.mint.com</BillEmail>
<ShipMethodId idDomain="QBO" />
<Balance>0.00</Balance>
<DiscountTaxable>true</DiscountTaxable>
</Header>
<Line>
<Desc>Beer HB</Desc>
<Taxable>true</Taxable>
<ItemId idDomain="QBO">4</ItemId>
</Line>
</Invoice>
2.
If you don't pass any value in the 'Amount' field of tag
or
If you skip that field altogether.
PFB sample request and response.
Request
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Invoice xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:ns2="http://www.intuit.com/sb/cdm/qbopayroll/v1" xmlns:ns3="http://www.intuit.com/sb/cdm/qbo">
<Header>
<Msg>Testing</Msg>
<CustomerId>6</CustomerId>
</Header>
<Line>
<Desc>Pens</Desc>
<Amount></Amount>
<Taxable>true</Taxable>
<ItemId>3</ItemId>
<UnitPrice>450</UnitPrice>
<Qty>1</Qty>
</Line>
</Invoice>
Response
<Invoice xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:qbp="http://www.intuit.com/sb/cdm/qbopayroll/v1" xmlns:qbo="http://www.intuit.com/sb/cdm/qbo">
<Id idDomain="QBO">57</Id>
<SyncToken>0</SyncToken>
<MetaData>
<CreateTime>2013-07-01T02:48:48-07:00</CreateTime>
<LastUpdatedTime>2013-07-01T02:48:48-07:00</LastUpdatedTime>
</MetaData>
<Header>
<DocNumber>1022</DocNumber>
<TxnDate>2013-07-01-07:00</TxnDate>
<Msg>Testing</Msg>
<CustomerId idDomain="QBO">6</CustomerId>
<ToBePrinted>false</ToBePrinted>
<ToBeEmailed>false</ToBeEmailed>
<DueDate>2013-07-01-07:00</DueDate>
<BillAddr>
<Line1>Park Avenue NY</Line1>
...
</BillAddr>
<ShipAddr>
<Line1>Park Avenue NY</Line1>
...
</ShipAddr>
<ShipMethodId idDomain="QBO" />
<Balance>0.00</Balance>
<DiscountTaxable>true</DiscountTaxable>
</Header>
<Line>
<Desc>Pens</Desc>
<Taxable>true</Taxable>
<ItemId idDomain="QBO">3</ItemId>
<UnitPrice>450</UnitPrice>
<Qty>1</Qty>
</Line>
</Invoice>
I guess, the second one is applicable in your case.
Please let me know if it answers your qts.
Thanks
It looks like the Amount in the Line is not being set. The Amount is a required field that needs to be set. Here is the doc: https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/v2/0400_quickbooks_online/invoice
The total amount field will be calculated
thanks
Jarred

Do I have to use XML parsing or any other way of saving the server response

I am getting the following response from server:
<?xml version="1.0" encoding="UTF-8"?>
<tracks type="array">
<track>
<id type="integer">13082503</id>
<created-at type="datetime">2011-04-05T05:48:05Z</created-at>
<user-id type="integer">2796383</user-id>
<duration type="integer">6715</duration>
<commentable type="boolean">true</commentable>
<state>finished</state>
<sharing>public</sharing>
<tag-list />
<permalink>myfirstsong-tutorial1-6</permalink>
<description nil="true" />
<streamable type="boolean">true</streamable>
<downloadable type="boolean">false</downloadable>
<genre nil="true" />
<release nil="true" />
<purchase-url nil="true" />
<label-id nil="true" />
<label-name nil="true" />
<isrc nil="true" />
<video-url nil="true" />
<track-type nil="true" />
<key-signature nil="true" />
<bpm nil="true" />
<title>MyFirstSong-Tutorial1</title>
<release-year nil="true" />
<release-month nil="true" />
<release-day nil="true" />
<original-format>m4a</original-format>
<license>all-rights-reserved</license>
<uri>http://api.soundcloud.com/tracks/13082503</uri>
<permalink-url>http://soundcloud.com/sleuth007/myfirstsong-tutorial1-6</permalink-url>
<artwork-url nil="true" />
<waveform-url>http://w1.sndcdn.com/8MqNbtkeyhNZ_m.png</waveform-url>
<user>
<id type="integer">2796383</id>
<permalink>sleuth007</permalink>
<username>sleuth007</username>
<uri>http://api.soundcloud.com/users/2796383</uri>
<permalink-url>http://soundcloud.com/sleuth007</permalink-url>
<avatar-url>http://a1.sndcdn.com/images/default_avatar_large.png?5fb6c47</avatar-url>
</user>
<stream-url>http://api.soundcloud.com/tracks/13082503/stream</stream-url>
<downloads-remaining type="integer">100</downloads-remaining>
<secret-token>s-5vz60</secret-token>
<secret-uri>http://api.soundcloud.com/tracks/13082503?secret_token=s-5vz60</secret-uri>
<user-playback-count type="integer">1</user-playback-count>
<user-favorite type="boolean">false</user-favorite>
<playback-count type="integer">0</playback-count>
<download-count type="integer">0</download-count>
<favoritings-count type="integer">0</favoritings-count>
<comment-count type="integer">0</comment-count>
<created-with>
<id type="integer">61</id>
<name>Cocoa API Wrapper Test</name>
<uri>http://api.soundcloud.com/apps/61</uri>
<permalink-url>http://soundcloud.com/apps/cocoa-api-wrapper-test</permalink-url>
</created-with>
<attachments-uri>http://api.soundcloud.com/tracks/13082503/attachments</attachments-uri>
</track>
</tracks>
Do I have to do XML parsing for this or is there any other way to save this as array
You will have to use NSXMLParser for parsing the xml file. "type=array" is XML attribute and not an array.