udiMagic XML tags

Understanding XML Tags

XML stands for Extensible Markup Language. Its primary purpose is to facilitate sharing of structured data across different information systems.

XML is a W3C recommendation and is the most popular and widely used format for Data-Interchange. It is classified as an Extensible Language because it allows users to define their own elements. You can get lots of XML tutorials at W3schools. For those who are new to XML, here's a brief introduction to XML (tags).

"XML tags are basically holders that hold your data. XML tags names are generally descriptive and the user can easily make out what it refers to."

Example:-
<book>My Book</book>


Tally XML Tags

Tally Prime has its own XML tags. Though there are thousands of tags supported by Tally, it is not very difficult to understand the same as the tag-names are descriptive. In addition to this, you can get the Tally XML tags from the Tally software itself.

Particulars Option
How to get XML tags for Tally Masters? Gateway of Tally • Display • List of Accounts • Alt+E
How to get XML tags for Tally Vouchers? Gateway of Tally • Display • Daybook • Alt+E

Here's an extract of how the Tally XML tags look like.

<DATE>01-04-2007</DATE>
<VOUCHERTYPENAME>Sales</VOUCHERTYPENAME>
....other tags....

Remarks:-
a) Herein, we have taken up just two XML tags to understand the basic concepts.
b) The 1st tag specifies the value for DATE tag.
c) The 2nd tag specifies the value for VOUCHERTYPENAME tag.


udiMagic XML Tags

udiMagic supports all Tally XML tags for the MASTER and VOUCHER objects. As a result, you can import any Master or Voucher from Excel to Tally. In addtion, udiMagic extends the Tally XML tags functionality by adding additional ATTRIBUTES to it. Let's see what does this mean.

Tag Name Tally Format udiMagic Format
<DATE> <DATE>01-04-2007</DATE> <DATE COLUMNREFERENCE="A"/>

Remarks:-
a) In the udiMagic tags format, we have used an Attribute called COLUMNREFERENCE. This instructs udiMagic to fetch data from the specified Column in the Excel-sheet.
b) There are several other ATTRIBUTES used by udiMagic which have been discussed later-on.

udiMagic uses the following TOP-LEVEL XML tags to identify the data in the Excel sheet.

The VOUCHER Tag

<VOUCHER>
    <DATE COLUMNREFERENCE="B"/>
    <NARRATION COLUMREFERENCE="I"/>
    ....other tags....
</VOUCHER>

The MASTER Tag
<MASTER TYPE="LEDGER">
    <NAME.LIST>
        <NAME COLUMNREFERENCE="C"/>
    </NAME.LIST>
    <PARENT>Sundry Debtors</PARENT>
    ....other tags....
</MASTER>

Remarks:-
udiMagic supports all Tally XML tags that are used for Masters like GROUP; LEDGER; STOCKITEM etc.


udiMagic Attributes

Attributes are used with XML tags to provide additional meaning to the Tags. udiMagic has its own attributes which are required for identifying Excel sheet data as given below:-


Attribute Remarks
COLUMNREFERENCE Used to specify the Column-name from which data is to be fetched

Example:-
<DATE COLUMNREFERENCE="B"/>
FORMULA Used to specify a Formula which is evaluated at run-time

Example:-
<AMOUNT FORMULA="=+H#*-1"/>
TYPE Used to specify the MASTER type.

Example:-
<MASTER TYPE="LEDGER">
.....
</MASTER>
SCROLL Specifies that the XML tag spans to multiple rows.

Example:-
<ALLINVENTORYENTRIES.LIST SCROLL="YES">
.......
</ALLINVENTORYENTIES.LIST>
SCROLLCOLUMN Specifies that the XML tag spans to multiple rows with respect to the specified Column.

Example:-
<ALLINVENTORYENTRIES.LIST SCROLL="YES" SCROLLCOLUMN="9">
....
</ALLINVENTORYENTIES.LIST>
SKIP Used to SKIP the tag

Example:-
<ALLINVENTORYENTRIES.LIST SKIP="=K#=0">
........
</ALLINVENTORYENTRIES.LIST>

Remarks:-
SKIP attribute is used to skip/ignore the tag including child-tags if the specified condition evaluates to TRUE.
SINGLERECORD Specifies that the XML tag is to be evaluated once only.

Example:-
<MASTER TYPE="LEDGER" SINGLERECORD="YES">
<NAME.LIST>
<NAME>Sale of FG</NAME>
</NAME.LIST>
<PARENT>Sales Accounts</PARENT>
<AFFECTSSTOCK>Yes</AFFECTSSTOCK>
</MASTER>
COMPANYNAME Specifies the Company in which the data is to be imported

Example:-
<MASTER TYPE="LEDGER" COMPANYNAME="ABC LTD">
......tags......
......tags......
</MASTER>

Alternatively, you can use the COMPANYNAME tag within the MASTER or VOUCHER tags as shown below:

Example:-
<MASTER TYPE="LEDGER">
<COMPANYNAME COLUMNREFERENCE="A"/>
......tags......
......tags......
</MASTER>
GROUPBY Used to Group data on a specific column or expression.

Example:-
<VOUCHER>
<ALLLEDGERENTRIES.LIST GROUPBY="=D#">
<AMOUNT FORMULA="={Round(M#,2)}">
......tags......
<ALLLEDGERENTRIES.LIST>
</VOUCHER>

In the aforesaid example, the amount in Column M is summed / grouped based on the values in Column D.
ALERT Displays a WARNING message to the user. This is used to alert the user if the excel data is incorrect / fails validation checks.

Example:-
<MASTER TYPE="LEDGER">
<STATENAME ALERT="=If(<Condition>,<AlertMessage>, '')" COLUMNREFERNCE="K">
......tags......
......tags......
</MASTER>

In the aforesaid example, we use IF statement. If the condition evaluates to true, then a warning message is displayed, else it is ignored.

Remarks:-
a) The above mentioned ATTRIBUTES are udiMagic specific and are not related/supported by Tally Software.
b) These attributes help udiMagic in retrieving data from the Excel sheet.