|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jsurveylib.utils.XMLUtil
public class XMLUtil
FOR INTERNAL USE ONLY.
Method Summary | |
---|---|
static java.lang.String |
elementToString(org.w3c.dom.Element element)
Serializes an Element, and returns it back in form of string. |
static java.util.Map<java.lang.String,java.lang.String> |
getAnswerMapFromElement(org.w3c.dom.Element element)
|
static org.w3c.dom.Element |
getXMLRoot(java.io.Reader input)
Gets the XML root element from the Reader and returns it. |
static void |
validateXML(java.io.Reader input,
org.xml.sax.ErrorHandler errorHandler)
Validates the XML by the XSD it finds in the XML. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void validateXML(java.io.Reader input, org.xml.sax.ErrorHandler errorHandler) throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
input
- The Reader of the XML file. This will be closed after it is used.errorHandler
- The error handler to use if an error occurs. If you pass in null, a standard error handler is used that throws all exceptions.
java.io.IOException
- If an error occurs reading the file.
javax.xml.parsers.ParserConfigurationException
- If an error occurs parsing the file.
org.xml.sax.SAXException
- If a SAX exception occurs.public static org.w3c.dom.Element getXMLRoot(java.io.Reader input) throws org.xml.sax.SAXException, java.io.IOException
input
- The Reader of the XML file. This will be closed after it is used.
java.io.IOException
- If an error occurs reading the file.
org.xml.sax.SAXException
- If a SAX exception occurs.public static java.util.Map<java.lang.String,java.lang.String> getAnswerMapFromElement(org.w3c.dom.Element element)
public static java.lang.String elementToString(org.w3c.dom.Element element) throws java.io.IOException
element
- The element to serialize
java.io.IOException
- If an error occurs while serializing
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |