The Westminster Bible Institute provides an XML encoding of the Westminster Leningrad Codex, the earliest complete text of the Hebrew Bible.
The text is searchable online, and also available for download in various formats, such as pdf.
In addition, when viewing the Pentateuch, the website provides the option of displaying each of the Pentateuchal sources (J, E, D, P, and R) by colour, according to Richard Elliott Friedman’s rendition of the Documentary Hypothesis.