Datatable to XML

studio
xml

#1

Is there simple way for DT to XML:

Input Datatable:
Name EmpID
Bharathi 1024
Raja 1025

Output Datatable:


Bharathi
1024
Raja
1025

The solution in How to create/generate XML out of datatable is different


#2

I get this with the linked solution. Do you need anything differently?

<?xml version="1.0" standalone="yes"?>
<DocumentElement>
  <TableName>
    <Name>Bharati</Name>
    <EmpID>1024</EmpID>
  </TableName>
  <TableName>
    <Name>Raja</Name>
    <EmpID>1025</EmpID>
  </TableName>
</DocumentElement>

#3

Can you share the solution please? I am not getting.


#4

In the invoke method for Dt.WriteXML pass a text file path.


#5

Hi,

I 'm trying to convert data table to XML file and tried the shared solution,but it’s not working me. Can you please share the solution to do this.

Thanks in Advance.


#6

Hi,

I tried again and it’s working fine.

Thanks in Advance