The law isn't just what's on the statute book, it has to be read in the context of case law (at least in jurisdictions that use a common law system), which evolves over time and can vary based on the individual facts of the case.
That said, things like that do exist - the UK's entire statute book (well, almost) is available online,[0] free of charge and via a RESFTful API in machine-readable formats.[1]
Likewise, the German federal government publishes the law in XML, and there's even a markdown representation available on github.[2]
That said, things like that do exist - the UK's entire statute book (well, almost) is available online,[0] free of charge and via a RESFTful API in machine-readable formats.[1]
Likewise, the German federal government publishes the law in XML, and there's even a markdown representation available on github.[2]
[0] http://legisltion.gov.uk/
[1] http://www.legislation.gov.uk/developer/formats
[2] https://github.com/bundestag/gesetze