Skip to main content

Raraunga XML
XML data

Learn about the XML markup used to represent legislation

The PCO drafts legislation using an XML-based publishing system. Documents are created as XML files and follow a highly structured schema.

Access to these XML files is available both via this website and through our API.

To access the XML source file for a piece of legislation you are viewing on the website, you can add .xml to the end of the URL. For example, to view the XML source file for the New Zealand Bill of Rights Act 1990, change the URL from https://legislation.govt.nz/act/public/1990/109/en/latest/ to https://legislation.govt.nz/act/public/1990/109/en/latest.xml.

If you wish to access XML files for a range of legislation or do so programmatically, our API provides an interface designed to enable this.

To help you make use of the XML files, we have documentation of the XML schema, along with DTD files that define the schema:

RSS feed link copied, you can now paste this link into your feed reader.