Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PaulDBrown
Community Champion
Community Champion

Error importing XML

Good day everyone,

 

Anyone have any experience on importing XML files?

I am trying to import a fairly small file but I am getting this error message:
xml error.JPG

 

(I have a number of files which I need to import with the same structure, but need to do the transformations on the first etc..)

Thanks!





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






1 ACCEPTED SOLUTION

Hello @PaulDBrown 


have you been able to solve the problem with the replies given?

If so, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

All the best

Jimmy

View solution in original post

7 REPLIES 7
Jimmy801
Community Champion
Community Champion

Hello @PaulDBrown 

 

I've never encountered problems when working with xml. Did you experiment with the encoding option in the third parameter of Xml.Tables?

If the file doesn't contain any sensible data, you can copy it to ondrive and link it here, so I could give it a test

 

Hello
I would suggest you post here the current datatable from your Power BI (go to the Table in Power BI, click on the upper left symbol and select copy table) and post the table here in the forum. Please change the data if contains sensitive information.

If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

@Jimmy801 

Thanks for looking into this. Here is the rogue file:

https://1drv.ms/u/s!AhGKDZz6e4HetxxeynLzdJWdBEmG?e=KBMPNX 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Hello @PaulDBrown 

 

i was able to open the xml file. This xml-file however doesn't represent a table, but Excel-file. Try to open the xml-file with excel instead to check-out the data. However, also with the xml-function you should get somehow the data

image.png

If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

 

@Jimmy801 

 

Thanks Jimmy for looking into this. How did you get PQ to read the XML file? (I tried using the XML as source first, then tried the Excel option; neither worked)

 

I finally resorted to saving each XML file as an Excel file (the files were of no considerable size or row count, so it was ok) and doing the transformations etc. on those. Bit of a pain, but anyway.

Thanks again.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Hello @PaulDBrown 


have you been able to solve the problem with the replies given?

If so, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

All the best

Jimmy

@Jimmy801 

No idea why, but just had another go at importing the xml file trhough PQ and this time it worked without a hitch. 

Thanks again for helping out!

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Hello @PaulDBrown 

 

i just saved a copy of the file you send me on my computer and accessed it without any special settings.

This is the code that was created

Quelle = Xml.Tables(File.Contents("C:\Users\xxxx\Downloads\rogue.xml"))

 

Jimmy

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors