Trying to parse an XML BLOB and convert it into CSV. Able to use the following code when using a Local File.
import xml.etree.ElementTree as et
SourceFileName = req.params.get('FileName')
SourceContainer = "C:\\AzureInputFiles\\"
SourceFileFullPath = SourceContainer + SourceFileName
xtree = et.parse(SourceFileFullPath)
xroot = xtree.findall(".//data/record")
df_cols=['Col1', 'Col2']
rows = []
Not able to use when working on Azure BLOB. How can I do that ? Not the cleanest but tried the following way by creating the URL with parameters. The Container is set for Public access and Blobs don't have restrictions. Library used : azure-storage-blob
import xml.etree.ElementTree as et
url = f"https://{account_name}.blob.core.windows.net/{container_name}/{blob_name}"
xtree = et.parse(url)
xroot = xtree.findall(".//data/record")
df_cols=['Col1', 'Col2']
rows = []
Any Suggestion to make it work ? Better way to access Blob ?
