|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ourgrid.common.xml.XMLUtil
public class XMLUtil
Field Summary | |
---|---|
protected static java.lang.String |
SCHEMA_VALIDATION_FEATURE_ID
Schema validation feature id (http://apache.org/xml/features/validation/schema). |
protected static java.lang.String |
VALIDATION_FEATURE_ID
Validation feature id (http://xml.org/sax/features/validation). |
Constructor Summary | |
---|---|
XMLUtil()
|
Method Summary | |
---|---|
static java.lang.String |
getAttributeValue(java.lang.String nameLowerCase,
java.lang.String nameUpperCase,
org.w3c.dom.NamedNodeMap attributes)
Gets the string value of the given attribute name( nameLowerCase or nameUpperCase ) |
static org.w3c.dom.Document |
parseXMLContent(java.lang.String xmlContent)
Parse the xmlContent string, verifying if the content is well-formed and validating with the schema, if it exists. |
static org.w3c.dom.Document |
parseXMLFile(java.lang.String fileName)
Parse the fileName in xml, verifying if the content is well-formed and validating with the schema, if it exists. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String VALIDATION_FEATURE_ID
protected static final java.lang.String SCHEMA_VALIDATION_FEATURE_ID
Constructor Detail |
---|
public XMLUtil()
Method Detail |
---|
public static org.w3c.dom.Document parseXMLContent(java.lang.String xmlContent) throws XMLParserException
xmlContent
- The xml content
XMLParserException
- If there is a problem of validation or
well-formed.public static org.w3c.dom.Document parseXMLFile(java.lang.String fileName) throws XMLParserException, java.io.IOException
fileName
- The xml file to be parsed
XMLParserException
- If there is a problem of validation or
well-formed.
java.io.IOException
public static java.lang.String getAttributeValue(java.lang.String nameLowerCase, java.lang.String nameUpperCase, org.w3c.dom.NamedNodeMap attributes)
nameLowerCase
- The name of the attribute in lowerCasenameUpperCase
- The name of the attribute in upperCaseattributes
- The attributes where is the attribute finded
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |