public class XmlParserHelper
extends java.lang.Object
Constructor and Description |
---|
XmlParserHelper() |
Modifier and Type | Method and Description |
---|---|
javax.xml.stream.XMLEventReader |
createXmlEventReader(java.lang.String resourceName,
java.io.InputStream xmlStream) |
javax.xml.validation.Schema |
getSchema(java.lang.String schemaResource)
Returns the XML schema identified by the given resource name.
|
java.lang.String |
getSchemaVersion(java.lang.String resourceName,
javax.xml.stream.XMLEventReader xmlEventReader)
Retrieves the schema version applying for the given XML input stream as
represented by the "version" attribute of the root element of the stream.
|
public java.lang.String getSchemaVersion(java.lang.String resourceName, javax.xml.stream.XMLEventReader xmlEventReader)
The given reader will be advanced to the root element of the given XML structure. It can be used for unmarshalling from there.
resourceName
- The name of the represented XML resource.xmlEventReader
- An STAX event readerpublic javax.xml.stream.XMLEventReader createXmlEventReader(java.lang.String resourceName, java.io.InputStream xmlStream)
public javax.xml.validation.Schema getSchema(java.lang.String schemaResource)
schemaResource
- the resource name identifying the schema.null
if the resource was not found or could
not be loaded.Copyright © 2007-2022 Red Hat, Inc. All Rights Reserved