Jump to content

Recommended Posts

Posted

Hey i need some help in generating XML file from my SQL database using C# Sharp , its actually a UNCTAD file format.. i have never worked with XML file before and not getting any reasonable help from internet. Can any1 plz help me to get started ... Thanking u in advance.before is the format in which XML file should be generated.Iske chakkar mei 2 days se Gym bhi nahi gaya

  <?xml version="1.0" encoding="UTF-8" ?> 
-  
- 
- 
- KHA00SDNTR1104-012011-03-272011-04-05
- 2550.0002000.00
- 
- C00004LufthansaFlughafen Kloten4DEU
- GBLIVSDKRT
- 
- FSMAN-001123MAB
- GBLIVSDKRT
- 
- Foreign Supplier CoAvenue de la Paix
- Lufthansa LtdKRT Airport
- International traders co.KRT Address
- 500BX1500Ship mks 1Dolls0 
- Information
- 
- FSMAN-002223AWB
- GBLIVSDKRT
- 
- Aero TransportersKRT Airport
- Swiss LtdAirport
- Traders Intl.Address
- 50BX500Ship MksElectronic equipment0

Posted
Use For XML auto in your query. The returned value from the query will be an xml value
XML auto wud give me an auto generated XML file .. but i need the XML file in the structure as mentioned above.
Posted
XML auto wud give me an auto generated XML file .. but i need the XML file in the structure as mentioned above.
Then try using FOR XML EXPLICIT. there you can specify the exact structure of how the XML should be generated. The convention is googlable and is quite flexible to decide the nested tag hierarchy and what attributes need to be included.
×
×
  • Create New...