Add check for cdata element to find summary text information #321
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #322
When running
usc-run bills
for the 119th congress (this most recent one in 2025), I noticed that bill summary text was always empty. When checking the xml, I found the summaries elements however it appears as though the summary text element is now wrapped under a cdata element.Sadly even though this change exists, the schema version remained unchanged, so I implemented a quick fix to check if the cdata field exists.
I found that this new cdata element appears for both the 118th and 119th congresses. Congresses before this appear to work and get the text data as expected.
If you want to take a look at the xml data I'm talking about, click on the examples I gave and look for the summaries element under bill.
Here are examples of the cdata element in congress 118 and 119:
https://www.govinfo.gov/bulkdata/BILLSTATUS/119/hr/BILLSTATUS-119hr1.xml
https://www.govinfo.gov/bulkdata/BILLSTATUS/118/hr/BILLSTATUS-118hr1.xml
Here's what the old ones looked like (without cdata):
https://www.govinfo.gov/bulkdata/BILLSTATUS/117/hr/BILLSTATUS-117hr1.xml
https://www.govinfo.gov/bulkdata/BILLSTATUS/116/hr/BILLSTATUS-116hr1.xml
I believe this may be an issue for other text elements as well, so this might be worth looking into.