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

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

Reply
Anonymous
Not applicable

Import multiple XML sources from singular online link zip file link

I am building a PBI report that has to do with current congressional legislation. The bulk data can all be found here: 

https://www.govinfo.gov/bulkdata/BILLSTATUS/117/hr/

 

I am trying to create a table where each row is a different bill.

 

This issue is that every individual bill has its own XML web link. For example: HR1 is found at https://www.govinfo.gov/bulkdata/BILLSTATUS/117/hr/BILLSTATUS-117hr1.xml and HR 23 is found at https://www.govinfo.gov/bulkdata/BILLSTATUS/117/hr/BILLSTATUS-117hr23.xml. Each one of these sources is only one row. I am trying to append all of these individual sources to create a table where each row is a different bill. 

 

At the bottom of the page there is a downloadable zip file with all of the bills: https://www.govinfo.gov/bulkdata/BILLSTATUS/117/hr/BILLSTATUS-117-hr.zip

 

Is there a way to download this zip file directly from the web and extract each individual xml file (bill) onto a different row? 

 

Alternatively, is there a different site that has all this information in the format I am looking for it in?

 
1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Refer to this excellent post by @artemus 

 

Solved: Re: How to connect Azure DevOps REST API in to pow... - Microsoft Power BI Community

 

Take that function, declare it in your Power Query and call it Unzip.  Then you can do things like:

 

let
    Source = Unzip(Web.Contents("https://www.govinfo.gov/bulkdata/BILLSTATUS/117/hr/BILLSTATUS-117-hr.zip")),
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"FileName", "Content"}, {"FileName", "Content"}),
    #"Added Custom" = Table.AddColumn(#"Expanded Column1", "Custom", each Text.FromBinary([Content]))
in
    #"Added Custom"

 

to get your indvidual bills

lbendlin_1-1618021139278.png

 

 

 

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

It is already part of the M code above - you get the contents of the XML in the text column. Power Query has an XML Parser.  You will need to indicate which leaves you want to read from the XML tree.

lbendlin
Super User
Super User

Refer to this excellent post by @artemus 

 

Solved: Re: How to connect Azure DevOps REST API in to pow... - Microsoft Power BI Community

 

Take that function, declare it in your Power Query and call it Unzip.  Then you can do things like:

 

let
    Source = Unzip(Web.Contents("https://www.govinfo.gov/bulkdata/BILLSTATUS/117/hr/BILLSTATUS-117-hr.zip")),
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"FileName", "Content"}, {"FileName", "Content"}),
    #"Added Custom" = Table.AddColumn(#"Expanded Column1", "Custom", each Text.FromBinary([Content]))
in
    #"Added Custom"

 

to get your indvidual bills

lbendlin_1-1618021139278.png

 

 

 

Anonymous
Not applicable

This is awesome! Thanks!! Now I just need to figure out how to pull XML files out of this zip folder. Any clue how that works? 

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Kudoed Authors