Sponsored
    Follow Us:
Sponsored

Tally XML is a markup language used by Tally, a popular accounting software, for importing and exporting data. Tally XML files have a specific structure and syntax, which can be understood by referring to the Tally XML schema and the Tally XML tags.

To understand Tally XML, it is helpful to have a basic understanding of XML and its syntax. Tally XML files are like other XML files, but they have specific tags and attributes that are used to represent accounting data.

The Tally XML schema defines the structure and rules for creating valid Tally XML files. It specifies the elements, attributes, and data types that can be used in a Tally XML file, and the relationships between them. The schema also provides documentation and examples for each tag and attribute, which can be helpful in understanding how to use them.

To understand a specific Tally XML file, it is helpful to look at the tags and attributes used in the file, and to refer to the Tally XML schema for documentation and examples. The tags and attributes used in a Tally XML file represent accounting data such as ledgers, groups, vouchers, and inventory items.

For example, here is a simple Tally XML file that creates a ledger:

<ENVELOPE>

<HEADER>

<TALLYREQUEST>Import Data</TALLYREQUEST>

</HEADER>

<BODY>

<IMPORTDATA>

<REQUESTDESC>

<REPORTNAME>All Masters</REPORTNAME>

<STATICVARIABLES>

<SVCURRENTCOMPANY>My Company</SVCURRENTCOMPANY>

</STATICVARIABLES>

</REQUESTDESC>

<REQUESTDATA>

<TALLYMESSAGE xmlns:UDF=”TallyUDF”>

<LEDGER RESERVEDNAME=”” NAME=”Sales”>

<PARENT>Sundry Debtors</PARENT>

<ADDRESS.LIST TYPE=”String”>

<ADDRESS></ADDRESS>

<ADDRESS></ADDRESS>

</ADDRESS.LIST>

</LEDGER>

</TALLYMESSAGE>

</REQUESTDATA>

</IMPORTDATA>

</BODY>

</ENVELOPE>

In this example, the Tally XML file creates a ledger named “Sales” under the group “Sundry Debtors”. The ledger has no address information, so the ADDRESS tags are left empty.

By understanding the syntax and structure of Tally XML files, and by referring to the Tally XML schema for documentation and examples, it is possible to create, import, and export accounting data in Tally using XML.

HOW CAN WE BUILD XML STRING USING EXCEL :

Here’s an example of how to use the CONCATENATE function in Excel to create the Tally XML code you provided:

=CONCATENATE(“<TALLYMESSAGE xmlns:UDF=””TallyUDF””><LEDGER RESERVEDNAME=”””” NAME=””Sales””><PARENT>Sundry Debtors</PARENT><ADDRESS.LIST

TYPE=””String””><ADDRESS></ADDRESS><ADDRESS></ADDRESS></ADDRESS.LIST></LEDGER></TALLYMESSAGE>”)

This formula concatenates various strings together to create the Tally XML code you provided. Note that the quotation marks are escaped with double quotation marks, as Excel requires this in order to include quotation marks in a string. Also note that any line breaks or indentation in the formula will be removed when the formula is evaluated, so the resulting XML code will be a single line.

XML ESCAPE CHARACTERS:

XML escape characters are special characters that have a specific meaning in XML, and therefore need to be encoded to be included as text within an XML document. The following are the five predefined XML escape characters:

1) &lt; – Represents the less-than symbol “<“.

2) &gt; – Represents the greater-than symbol “>”.

3) &amp; – Represents the ampersand symbol “&”.

4) &apos; – Represents the apostrophe symbol “‘”.

5) &quot; – Represents the double quotation mark symbol “”.

When one of these special characters appears within an XML element, it must be replaced with its corresponding escape sequence to ensure that the XML parser will interpret the text correctly. For example, the text “10 > 5” would need to be encoded as “10 > 5” in an XML document.

Here’s an example of how to use escape characters in XML:

<example>

<text>This &amp; That</text>

<quote>He said, &quot;Hello!&quot;</quote>

</example>

It’s worth noting that manually building Tally XML using the CONCATENATE function in Excel can be time-consuming and error-prone, especially if you need to create a large amount of XML code. If you need to create a lot of Tally XML, it may be more efficient to use a dedicated tool or library that can help you generate the XML programmatically.

Access Denied! Only Regstered Users Can Download The File "Understanding Tally Xml Schema And Building XML String". Register Here or Login
Sponsored

Tags:

Author Bio

I'm thrilled to introduce myself as a Chartered Accountant with a deep passion for programming. My journey has led me to master the realms of finance and technology, allowing me to seamlessly merge these two worlds. Alongside my financial expertise, I wield programming skills in VB.NET and VBA langu View Full Profile

My Published Posts

Bank statement import (Excel to Tally ) ITC Reconciliation Tool View More Published Posts

Join Taxguru’s Network for Latest updates on Income Tax, GST, Company Law, Corporate Laws and other related subjects.

Leave a Comment

Your email address will not be published. Required fields are marked *

Sponsored
Sponsored
Ads Free tax News and Updates
Sponsored
Search Post by Date
December 2024
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031