sansat6699 Posted April 10, 2009 Share Posted April 10, 2009 i am creating application in c# .net 3.5 i want create file like giveni am having very less knowledge in xml please help me <ENVELOPE><HEADER><TALLYREQUEST>Import Data</TALLYREQUEST></HEADER><BODY><IMPORTDATA><REQUESTDESC><REPORTNAME>Vouchers</REPORTNAME><STATICVARIABLES><SVCURRENTCOMPANY>As Enterprise</SVCURRENTCOMPANY></STATICVARIABLES></REQUESTDESC><REQUESTDATA><TALLYMESSAGE xmlns:UDF="TallyUDF"> <VOUCHER REMOTEID="ecc576b5-9209-40e9-9673-590cdf81b646-00000037" VCHTYPE="Sales" ACTION="Create"> <ISOPTIONAL>No</ISOPTIONAL> <USEFORGAINLOSS>No</USEFORGAINLOSS> <USEFORCOMPOUND>No</USEFORCOMPOUND> <VOUCHERTYPENAME>Sales</VOUCHERTYPENAME> <DATE>20090404</DATE> <EFFECTIVEDATE>20090404</EFFECTIVEDATE> <ISCANCELLED>No</ISCANCELLED> <USETRACKINGNUMBER>No</USETRACKINGNUMBER> <ISPOSTDATED>No</ISPOSTDATED> <ISINVOICE>Yes</ISINVOICE> <DIFFACTUALQTY>No</DIFFACTUALQTY> <VOUCHERNUMBER>1</VOUCHERNUMBER> <PARTYNAME>Gl Construction</PARTYNAME> <PARTYLEDGERNAME>Gl Construction</PARTYLEDGERNAME> <ASPAYSLIP>No</ASPAYSLIP> <GUID>ecc576b5-9209-40e9-9673-590cdf81b646-00000037</GUID> <ALTERID> 58</ALTERID> <ALLLEDGERENTRIES.LIST> <REMOVEZEROENTRIES>No</REMOVEZEROENTRIES> <ISDEEMEDPOSITIVE>Yes</ISDEEMEDPOSITIVE> <LEDGERFROMITEM>No</LEDGERFROMITEM> <LEDGERNAME>Gl Construction</LEDGERNAME> <AMOUNT>-2300.00</AMOUNT> <BILLALLOCATIONS.LIST> <NAME>1</NAME> <BILLTYPE>New Ref</BILLTYPE> <BILLCREDITPERIOD/> <AMOUNT>-2300.00</AMOUNT> </BILLALLOCATIONS.LIST> </ALLLEDGERENTRIES.LIST> <ALLLEDGERENTRIES.LIST> <REMOVEZEROENTRIES>No</REMOVEZEROENTRIES> <ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE> <LEDGERFROMITEM>No</LEDGERFROMITEM> <LEDGERNAME>Sale</LEDGERNAME> <AMOUNT>2300.00</AMOUNT> </ALLLEDGERENTRIES.LIST> <UDF:BUYERNAME.LIST DESC="`BUYERNAME`" ISLIST="YES"> <UDF:BUYERNAME DESC="`BUYERNAME`">Gl Construction</UDF:BUYERNAME> </UDF:BUYERNAME.LIST> <UDF:DATETIMEOFINVOICE.LIST DESC="`DATETIMEOFINVOICE`" ISLIST="YES"> <UDF:DATETIMEOFINVOICE DESC="`DATETIMEOFINVOICE`">4-Apr-2009 at 18:09</UDF:DATETIMEOFINVOICE> </UDF:DATETIMEOFINVOICE.LIST> <UDF:DATETIMEOFREMOVAL.LIST DESC="`DATETIMEOFREMOVAL`" ISLIST="YES"> <UDF:DATETIMEOFREMOVAL DESC="`DATETIMEOFREMOVAL`">4-Apr-2009 at 18:09</UDF:DATETIMEOFREMOVAL> </UDF:DATETIMEOFREMOVAL.LIST> <UDF:BASEPARTYNAME.LIST DESC="`BASEPARTYNAME`" ISLIST="YES"> <UDF:BASEPARTYNAME DESC="`BASEPARTYNAME`">Gl Construction</UDF:BASEPARTYNAME> </UDF:BASEPARTYNAME.LIST> </VOUCHER></TALLYMESSAGE></REQUESTDATA></IMPORTDATA></BODY></ENVELOPE> thank you Link to comment Share on other sites More sharing options...
boen_robot Posted April 10, 2009 Share Posted April 10, 2009 Import the System.Xml namespace with using System.Xml; and then define a variable of type "XmlDocument". From then on, it's all DOM. You can read about it at the DOM tutorial. Link to comment Share on other sites More sharing options...
jesh Posted April 10, 2009 Share Posted April 10, 2009 If you don't know anything about XML - and therefore, probably, little about XML DOM - you can also just use a StringBuilder to write out the XML and either save the file to disk or return it in a HttpResponse. StringBuilder xml = new StringBuilder();xml.Append("<ENVELOPE></ENVELOPE>");Response.Clear();Response.ContentType = "text/xml";Response.Write(xml.ToString()); Link to comment Share on other sites More sharing options...
sansat6699 Posted April 11, 2009 Author Share Posted April 11, 2009 thanks guys i try out and let u know Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.