An Azure service for ingesting, preparing, and transforming data at scale.
XML format is supported for the following connectors: Amazon S3, Amazon S3 Compatible Storage, Azure Blob, Azure Data Lake Storage Gen1, Azure Data Lake Storage Gen2, Azure Files, File System, FTP, Google Cloud Storage, HDFS, HTTP, Oracle Cloud Storage and SFTP. It is supported as source but not sink. Consider exploring the "Transform XML" feature in Azure Logic Apps to see if it aligns with your needs :
- A guide on using Azure Logic Apps for importing CSV files to SQL Server: http://blogs.recneps.net/post/Using-Azure-Logic-Apps-to-Import-CSV-to-SQL-Server
- A discussion on Stack Overflow about converting CSV to XML in Logic Apps: https://stackoverflow.com/questions/61417713/how-to-convert-a-csv-to-xml-in-logic-apps
- A forum post on MSDN about converting CSV/Excel to XML in Logic Apps: https://social.msdn.microsoft.com/Forums/en-US/dfce78db-ebd6-41d9-ac7b-423a1f83f186/convert-csvexcell-to-xml-in-logic-app Additionally, it's strongly encouraged to support existing feature requests on the ADF User Voice forum by upvoting or commenting. This can help prioritize the development of features such as:
- XML support at the sink side
- Support for XML files for ADLS as a sink If you have the possibility to use python :
import pandas as pd
import xml.etree.ElementTree as ET
# Load the Excel/CSV file
df = pd.read_csv('path_to_your_file.csv')
# Convert the DataFrame to XML format
root = ET.Element("Root")
for _, row in df.iterrows():
record = ET.SubElement(root, "Record")
for col in df.columns:
child = ET.SubElement(record, col)
child.text = str(row[col])
# Convert the XML tree to a string
xml_str = ET.tostring(root, encoding='utf8', method='xml')
# Save or use the XML string as needed