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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
SamTrexler
Helper IV
Helper IV

XML import truncates text in columns

I am importing multiple XML files from a directory. There are 14 files in the directory I am using for testing, and each file is very small. All of them have the same structure, and all appear to import correctly using Xml.Tables(File.Contents("mypath\myfile.xml")).

 

However for one particular file, when I expand one of the tables that contains a column I need, I find truncated text in the column, and that is throwing off the rest of the processing. Only the first 1,054 characters are retrieved and this is followed by an ellipsis (three dots). Examining the file, the XML node contains 4,496 characters - not much text, there should be no reason to truncate it.

 

Removing the XML.Tables() and looking at the data retrieved by File.Contents shows all 4,496 characters between the node start and end tags. So the truncation of this column (which has type text) is being done by the XML.Tables function. And XML.Document does the same thing.

 

The file contains 129 lines of text for this node, and the import is truncating after 33 lines of text.  The only odd thing I can see is that line 127 is exceptionally long - 508 characters - but the text is truncated long before reaching this line of text.

 

Why is the text getting truncated in this column? And what can I do to get the full text?

 

Thanks.

1 ACCEPTED SOLUTION
SamTrexler
Helper IV
Helper IV

Sorry, this seems to have been an artifact of my testing. Now that I have returned to a more normal set of steps, it is working correctly. Oh, how I wish I could step through a function using "Applied Steps"!

 

Will delete this topic.

View solution in original post

1 REPLY 1
SamTrexler
Helper IV
Helper IV

Sorry, this seems to have been an artifact of my testing. Now that I have returned to a more normal set of steps, it is working correctly. Oh, how I wish I could step through a function using "Applied Steps"!

 

Will delete this topic.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.