diff options
author | kstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2010-07-27 20:15:31 +0000 |
---|---|---|
committer | kstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2010-07-27 20:15:31 +0000 |
commit | 7848a953758fe645da5abc16eb8abff1fdc11da8 (patch) | |
tree | c18165f0b66300c9fac86d19274af25c537fd035 /common/src/main/java/at | |
parent | 66a1e0545eca48d90b29b2c35c82be8dccb28bfa (diff) | |
download | moa-id-spss-7848a953758fe645da5abc16eb8abff1fdc11da8.tar.gz moa-id-spss-7848a953758fe645da5abc16eb8abff1fdc11da8.tar.bz2 moa-id-spss-7848a953758fe645da5abc16eb8abff1fdc11da8.zip |
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1177 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'common/src/main/java/at')
-rw-r--r-- | common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java index b403961d8..39cdf4e87 100644 --- a/common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java +++ b/common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java @@ -378,6 +378,24 @@ public class DOMUtils { .parseDocument(inputStream, true, Constants.ALL_SCHEMA_LOCATIONS, null) .getDocumentElement(); } + + /** + * A convenience method to parse an XML document non validating. + * + * @param inputStream The <code>InputStream</code> containing the XML + * document. + * @return The root element of the parsed XML document. + * @throws SAXException An error occurred parsing the document. + * @throws IOException An error occurred reading the document. + * @throws ParserConfigurationException An error occurred configuring the XML + * parser. + */ + public static Element parseXmlNonValidating(InputStream inputStream) + throws ParserConfigurationException, SAXException, IOException { + return DOMUtils + .parseDocument(inputStream, false, Constants.ALL_SCHEMA_LOCATIONS, null) + .getDocumentElement(); + } /** * Schema validate a given DOM element. |