TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The entire US Code is now online in XML

320 pointsby liscovichalmost 12 years ago

31 comments

vogalmost 12 years ago
I find it amusing that here in Germany, we have that for years:<p><a href="http://www.gesetze-im-internet.de/" rel="nofollow">http:&#x2F;&#x2F;www.gesetze-im-internet.de&#x2F;</a><p>All laws are available in XML, HTML, PDF, etc. The site also provides an RSS feed.<p>In addition, some enthusiasts regularily download stuff from there and apply those to a Git repository:<p><a href="https://github.com/bundestag/gesetze" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bundestag&#x2F;gesetze</a><p>That way, this repository contains not only the current laws, but also the history of how the laws developed!<p>For the Git repository, the XML version is not used directly, but converted to markdown. This produces very readable diffs:<p><a href="https://github.com/bundestag/gesetze/commit/f90e8fc8eb20f08173e608f493e15f986d7e43ba" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bundestag&#x2F;gesetze&#x2F;commit&#x2F;f90e8fc8eb20f081...</a><p>Wouldn&#x27;t it be cool if we could finally manage our laws of filing pull requests?
评论 #6137753 未加载
评论 #6138583 未加载
评论 #6139539 未加载
pnathanalmost 12 years ago
I&#x27;m really tempted to collect the XML files and put them on github, with periodic checkpoints to update it with the latest.<p>Watching the evolution of law over time is a fascinating thing and using SW engineering tools to help would be really fun.
评论 #6135942 未加载
评论 #6136438 未加载
评论 #6135801 未加载
评论 #6135832 未加载
评论 #6135812 未加载
评论 #6135966 未加载
评论 #6136065 未加载
评论 #6135804 未加载
评论 #6136602 未加载
评论 #6135987 未加载
评论 #6136560 未加载
OldSchoolalmost 12 years ago
Caveat for for many of us overly rational thinkers: the powers that be deliberately are allowed to &#x27;interpret&#x27; this code nondeterministically by many different means including its &#x27;spirit,&#x27; admissibility of relevant information, manipulation of venue and participants, apparently even extrajudicial proceedings lately.<p>In short, that allows a lawyer to answer almost any question with &quot;it depends,&quot; and start billing.
评论 #6136238 未加载
评论 #6137977 未加载
评论 #6136171 未加载
评论 #6136129 未加载
评论 #6137574 未加载
评论 #6139788 未加载
评论 #6136309 未加载
评论 #6136930 未加载
评论 #6138117 未加载
评论 #6137272 未加载
评论 #6137658 未加载
评论 #6137652 未加载
评论 #6137870 未加载
ChuckMcMalmost 12 years ago
This is pretty awesome, and if it were in git&#x2F;hg would have the ability to write a &#x27;blame&#x27; tool to figure out who voted on the part of the law that is pissing you off :-)
评论 #6136193 未加载
评论 #6136166 未加载
antitrustalmost 12 years ago
This actually makes law accessible to the technologically-savvy out there, and is going to launch a thousand apps giving specialized legal advice.<p>This could in turn mean a reduction in the cost of litigation, which would hopefully be passed on to the rest of us.<p>Hopefully I won&#x27;t get sued for that statement.
评论 #6136096 未加载
评论 #6136162 未加载
liscovichalmost 12 years ago
If you were to start a new country, what would the legislative process look like there? For example, how should new &quot;startup nations&quot; like BlueSeed (<a href="http://blueseed.co" rel="nofollow">http:&#x2F;&#x2F;blueseed.co</a>) inspired by Seasteading Institute go about passing and storing laws? Should they have some sort of open github repo to which anyone can make pull requests? How do you see the congress of the future?
评论 #6136397 未加载
评论 #6136962 未加载
评论 #6137081 未加载
fnordfnordfnordalmost 12 years ago
Doesn&#x27;t appear to include codes and standards which are included by reference such as NFPA, IBC, IRC, SAE, etc. (see [1] for a non-gov&#x27;t project to publish those)<p>Nevertheless it is a very good thing to see the the gov&#x27;t publish (most of) the law in an easy to use format.<p>[1] <a href="https://public.resource.org/" rel="nofollow">https:&#x2F;&#x2F;public.resource.org&#x2F;</a>
calpatersonalmost 12 years ago
For those of us who don&#x27;t know anything about it, what are the uses of machine readable law?
评论 #6135722 未加载
评论 #6135822 未加载
techtalskyalmost 12 years ago
I&#x27;m probably a little late to the party, but I think it&#x27;s worth mentioning that some of the &quot;XML&quot; looks like this:<p>&lt;tr style=&quot; -uslm-lc:II22; &quot;&gt;&lt;td style=&quot; text-align:left; vertical-align:top; border-right:1px solid black; padding-right:2pt;&quot;&gt;&lt;p style=&quot; text-align:left; text-indent: -1em; padding-left:1em;&quot;&gt;<p>Wow. I wonder what -uslm-lc does.
评论 #6138813 未加载
tmoertelalmost 12 years ago
It&#x27;s tragic that the United States (Federal) Legislative Model (USLM) is defined in terms of W3C XML Schema Definition language (XSD) instead of the comparably sane RELAX NG and its easily interpreted compact syntax. You would think that something this important ought to be made clear and understandable.<p>EDITED TO CLARIFY: The tragic part isn&#x27;t that the schema is <i>given</i> in XSD but that it&#x27;s <i>defined</i> in XSD, which lacks RELAX NG&#x27;s simple semantics and composibility rules. For a good summary of what I&#x27;m referring to, see James Clark&#x27;s message to the IETF on the subject:<p><a href="http://www.imc.org/ietf-xml-use/mail-archive/msg00217.html" rel="nofollow">http:&#x2F;&#x2F;www.imc.org&#x2F;ietf-xml-use&#x2F;mail-archive&#x2F;msg00217.html</a>
评论 #6136113 未加载
liscovichalmost 12 years ago
An alternative XML version of the US Code from Cornell Law School: <a href="http://www.law.cornell.edu/wiki/lexcraft/united_states_code_in_xml" rel="nofollow">http:&#x2F;&#x2F;www.law.cornell.edu&#x2F;wiki&#x2F;lexcraft&#x2F;united_states_code_...</a>
ilakshalmost 12 years ago
This reminds me of a recent discussion where someone mentioned tools over process. (<a href="http://rc3.org/2013/07/29/seven-signs-of-dysfunctional-engineering-teams/" rel="nofollow">http:&#x2F;&#x2F;rc3.org&#x2F;2013&#x2F;07&#x2F;29&#x2F;seven-signs-of-dysfunctional-engin...</a>)<p>I would say that the &#x27;law&#x27; is just subjective manual process, and we desperately need more tools for every-day judgement and decision making.<p>For example, if there were a computer system that logged all corporate financial transactions including income, then we could automatically tax large corporations, rather than waiting for them to report income through loopholes.
lisperalmost 12 years ago
This information has been available for a long time on plainsite:<p><a href="http://www.plainsite.org/laws/index.html?corpusid=3" rel="nofollow">http:&#x2F;&#x2F;www.plainsite.org&#x2F;laws&#x2F;index.html?corpusid=3</a>
thinkcompalmost 12 years ago
I&#x27;m attempting to centralize many different sets of laws on PlainSite:<p><a href="http://www.plainsite.org/laws" rel="nofollow">http:&#x2F;&#x2F;www.plainsite.org&#x2F;laws</a><p>Feel free to contribute.
tbatteriialmost 12 years ago
now if the same could be provided for bills(ideally before they are voted on), and that should go in github or something.
评论 #6136035 未加载
评论 #6135995 未加载
thehmealmost 12 years ago
Since this is hacker news, I was curious to see which code the subject was talking about and surprisingly not the code I was thinking of. I wonder how much more of this gov code has actually been read by the people in all those countries where it&#x27;s been available longer.
mathattackalmost 12 years ago
Putting something online is very different than actually getting meaning out of it. I&#x27;m afraid that this will push us towards more laws rather than less. But... Perhaps there will be good machine learning apps that can make sense out of all the contradictions.
mpynealmost 12 years ago
This is awesome. They even have a stylesheet apparently.<p>However though the file claims to be UTF-8, vim seems to disagree, at least for title 10. I can&#x27;t tell what encoding it really <i>is</i> though, doesn&#x27;t seem to be latin1 or windows-1252 either.
评论 #6136593 未加载
sinzonealmost 12 years ago
The developer friendly RESTful version: <a href="https://www.mashape.com/community/united-states-code#!documentation" rel="nofollow">https:&#x2F;&#x2F;www.mashape.com&#x2F;community&#x2F;united-states-code#!docume...</a>
liscovichalmost 12 years ago
Does anyone know what software is used by the hill staffers when drafting new bills? How do they make sure that the laws do not contradict each other?
pseingatlalmost 12 years ago
I can&#x27;t wait to look for the law whereby Congress established a church in violation of the Establishment Clause. But no one complained.
pdwalmost 12 years ago
I&#x27;m annoyed that Title 38 - Veteran&#x27;s Benefits is out of alphabetical order. Was it originally called Pensions or something?
评论 #6136423 未加载
评论 #6136429 未加载
jingoalmost 12 years ago
The USC has been available in HTML or ASCII for many years. From house.gov, gpo.gov and cornell.edu, to name a few sources.
tlrobinsonalmost 12 years ago
In case anyone was wondering, it&#x27;s about 80MB zipped, 500MB unzipped.
methehackalmost 12 years ago
Does anyone know how people search this now and how much it costs?
评论 #6135963 未加载
pkinnairdalmost 12 years ago
repo with the contents of the house.gov site: <a href="https://github.com/peterkinnaird/US-Code" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;peterkinnaird&#x2F;US-Code</a>
prmobiledevalmost 12 years ago
Portugal should do this to their civil code!!!
bandushrewalmost 12 years ago
Except for the secret laws, of course...
krobalmost 12 years ago
does that mean these are all the current federal laws?..
评论 #6136610 未加载
rogerchuckeralmost 12 years ago
Genuinely curious - how can this data be used from a software perspective?
tianhealmost 12 years ago
XML? this should be in json!
评论 #6135776 未加载
评论 #6135761 未加载
评论 #6135935 未加载
评论 #6136181 未加载
评论 #6135923 未加载
评论 #6135853 未加载
评论 #6135952 未加载