aboutsummaryrefslogtreecommitdiff
path: root/common/src/main/java/at/gv
diff options
context:
space:
mode:
authorkstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d>2010-07-27 20:15:31 +0000
committerkstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d>2010-07-27 20:15:31 +0000
commit7848a953758fe645da5abc16eb8abff1fdc11da8 (patch)
treec18165f0b66300c9fac86d19274af25c537fd035 /common/src/main/java/at/gv
parent66a1e0545eca48d90b29b2c35c82be8dccb28bfa (diff)
downloadmoa-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/gv')
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java18
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.