Below is the XML format for creating CostCentre in tally using XML API.
<ENVELOPE>
<HEADER>
<TALLYREQUEST>Import Data</TALLYREQUEST>
</HEADER>
<BODY>
<IMPORTDATA>
<REQUESTDESC>
<REPORTNAME>All Masters</REPORTNAME>
</REQUESTDESC>
<REQUESTDATA>
<TALLYMESSAGE xmlns:UDF="TallyUDF">
<COSTCENTRE NAME="NewCostCentre">
<NAME>NewCostCentre</NAME>
</COSTCENTRE>
</TALLYMESSAGE>
</REQUESTDATA>
</IMPORTDATA>
</BODY>
</ENVELOPE>
Can anyone help in delete xml and alter xml formats?
Make this small change in the XML tag COSTCENTRE to 'DELETE' -
<COSTCENTRE NAME="NewCostCentre" ACTION="DELETE">
The rest of the XML remains same.
To alter, set the ACTION attribute to ALTER.
Lets say you want to alter the name 'NewCostCentre' to 'OldCostCentre'. The following would be your XML -
<COSTCENTRE NAME="NewCostCentre" ACTION="ALTER">
<NAME>OldCostCentre</NAME>