I’m working with Tally XML requests, and I need to extract the PriceLevels
from the XML data. The XML structure contains various elements, but I’m unsure how to correctly identify and extract the PriceLevels
.
Here’s the XML request I’m using to fetch LEDGER
data:
<ENVELOPE>
<HEADER>
<!-- Metadata about the request -->
<VERSION>1</VERSION>
<TALLYREQUEST>EXPORT</TALLYREQUEST>
<TYPE>COLLECTION</TYPE>
<ID>CUSTOMERDATA</ID>
</HEADER>
<BODY>
<DESC>
<!-- Static variables defining the date range -->
<STATICVARIABLES>
<SVFROMDATE>20240120</SVFROMDATE>
<SVTODATE>20250120</SVTODATE>
</STATICVARIABLES>
<TDL>
<TDLMESSAGE>
<!-- Collection of customer data (LEDGER) -->
<COLLECTION ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No" NAME="CUSTOMERDATA">
<TYPE>LEDGER</TYPE>
<!-- Fields to fetch for the LEDGER data -->
<FETCH>NAME,PARENT,LEDMAILINGDETAILS.LIST,GUID,PARTYGSTIN,BILLCREDITPERIOD,LEDGERMOBILE,LEDGERCOUNTRYISCODE,COUNTRYOFRESIDENCE,ISDELETED,ALTERID,EMAIL,PRIORSTATENAME,GSTIN,PINCODE,CONTACTDETAILS.LIST</FETCH>
</COLLECTION>
</TDLMESSAGE>
</TDL>
</DESC>
</BODY>
</ENVELOPE>
I’m working with Tally XML requests, and I need to extract the PriceLevels
from the XML data. The XML structure contains various elements, but I’m unsure how to correctly identify and extract the PriceLevels
.
Here’s the XML request I’m using to fetch LEDGER
data:
<ENVELOPE>
<HEADER>
<!-- Metadata about the request -->
<VERSION>1</VERSION>
<TALLYREQUEST>EXPORT</TALLYREQUEST>
<TYPE>COLLECTION</TYPE>
<ID>CUSTOMERDATA</ID>
</HEADER>
<BODY>
<DESC>
<!-- Static variables defining the date range -->
<STATICVARIABLES>
<SVFROMDATE>20240120</SVFROMDATE>
<SVTODATE>20250120</SVTODATE>
</STATICVARIABLES>
<TDL>
<TDLMESSAGE>
<!-- Collection of customer data (LEDGER) -->
<COLLECTION ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No" NAME="CUSTOMERDATA">
<TYPE>LEDGER</TYPE>
<!-- Fields to fetch for the LEDGER data -->
<FETCH>NAME,PARENT,LEDMAILINGDETAILS.LIST,GUID,PARTYGSTIN,BILLCREDITPERIOD,LEDGERMOBILE,LEDGERCOUNTRYISCODE,COUNTRYOFRESIDENCE,ISDELETED,ALTERID,EMAIL,PRIORSTATENAME,GSTIN,PINCODE,CONTACTDETAILS.LIST</FETCH>
</COLLECTION>
</TDLMESSAGE>
</TDL>
</DESC>
</BODY>
</ENVELOPE>
Share
Improve this question
asked Feb 3 at 9:50
bjss kiritibjss kiriti
211 bronze badge
6
- Please, take some time to read how to ask and How to create a Minimal, Reproducible Example – LMC Commented Feb 3 at 15:18
- 1 If you're familiar with Tally, you'll understand the question. However, if your knowledge is primarily related to Java or something else, you may not fully grasp the question. Please take some time to read the entire question. – bjss kiriti Commented Feb 4 at 12:23
- It's not about the language, it's about SO recommended (and expected) question contents. As it is, is a low quality question with just an input sample but no code showing your effort to solve the problem and will probably get very low attention besides this kind attempt to help you get an answer. – LMC Commented Feb 4 at 13:10
- Tally is not a programming language, and it's clear that you don’t understand my requirement. Commenting on a question without even knowing the context is unhelpful. This has nothing to do with code, and it’s evident that you didn’t read the question or requirement properly. Next time, please understand the requirement before posting, SO please put some effort to understand the requirement. – bjss kiriti Commented Feb 4 at 17:30
- 1 Good luck! I wish you get an answer soon! Have a great life. – LMC Commented Feb 4 at 20:20
1 Answer
Reset to default 0price levels are inside company, So change collection to
<COLLECTION ...>
<TYPE>Price Level : Company </TYPE>
<Childof> ##SVCurrentCompany</Childof>
</COLLECTION>