|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.qtitools.qti.node.XmlUtils
public class XmlUtils
This class encapsulates XML parser.
| Nested Class Summary | |
|---|---|
static class |
XmlUtils.UnicodeReader
Generic unicode textreader, which will use BOM mark to identify the encoding to be used. |
| Field Summary | |
|---|---|
static java.lang.String |
ATTRIBUTE_SCHEMA_LANGUAGE_NAME
Name of schema language attribute. |
static java.lang.String |
ATTRIBUTE_SCHEMA_LANGUAGE_VALUE
Value of schema language attribute. |
static java.lang.String |
ATTRIBUTE_SCHEMA_SOURCE_NAME
Name of schema location attribute. |
static java.lang.String |
ATTRIBUTE_SCHEMA_SOURCE_VALUE
Value of chema location attribute. |
| Constructor Summary | |
|---|---|
XmlUtils()
|
|
| Method Summary | |
|---|---|
static javax.xml.parsers.DocumentBuilder |
getBuilder(boolean validate)
Gets document builder. |
static org.w3c.dom.Document |
getDocument(java.io.File file,
boolean validate)
Gets document from given source file. |
static org.w3c.dom.Document |
getDocument(java.lang.String string,
boolean validate)
Gets document from given source string. |
static javax.xml.parsers.DocumentBuilderFactory |
getFactory(boolean validate)
Gets document builder factory. |
static org.w3c.dom.Node |
getFirstElementNode(org.w3c.dom.Document document)
Gets first element node from given source document. |
static org.w3c.dom.Node |
getFirstElementNode(java.io.File file,
boolean validate)
Gets first element node from given source file. |
static org.w3c.dom.Node |
getFirstElementNode(java.lang.String string,
boolean validate)
Gets first element node of given source string. |
static org.w3c.dom.Node |
getFirstElementNode(java.net.URL url,
boolean validate)
Gets first element node from given source url. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ATTRIBUTE_SCHEMA_LANGUAGE_NAME
public static final java.lang.String ATTRIBUTE_SCHEMA_LANGUAGE_VALUE
public static final java.lang.String ATTRIBUTE_SCHEMA_SOURCE_NAME
public static final java.lang.String ATTRIBUTE_SCHEMA_SOURCE_VALUE
| Constructor Detail |
|---|
public XmlUtils()
| Method Detail |
|---|
public static javax.xml.parsers.DocumentBuilderFactory getFactory(boolean validate)
validate - whether validate document
public static javax.xml.parsers.DocumentBuilder getBuilder(boolean validate)
throws QTIParseException
validate - whether validate document
QTIParseException - if any parsing error occurs
public static org.w3c.dom.Document getDocument(java.io.File file,
boolean validate)
throws QTIParseException
file - source filevalidate - whether validate document
QTIParseException - if any parsing error occurs
public static org.w3c.dom.Document getDocument(java.lang.String string,
boolean validate)
throws QTIParseException
string - source stringvalidate - whether validate document
QTIParseException - if any parsing error occurs
public static org.w3c.dom.Node getFirstElementNode(java.net.URL url,
boolean validate)
throws QTIParseException
url - source urlvalidate - whether validate document
QTIParseException - if any parsing error occurs
public static org.w3c.dom.Node getFirstElementNode(java.io.File file,
boolean validate)
throws QTIParseException
file - source filevalidate - whether validate document
QTIParseException - if any parsing error occurs
public static org.w3c.dom.Node getFirstElementNode(java.lang.String string,
boolean validate)
throws QTIParseException
string - source stringvalidate - whether validate document
QTIParseException - if any parsing error occurs
public static org.w3c.dom.Node getFirstElementNode(org.w3c.dom.Document document)
throws QTIParseException
document - source document
QTIParseException - if given document does not contain any element node
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||