|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pdfsam.guiclient.utils.XmlUtility
public final class XmlUtility
Utility class to deal with xml
| Method Summary | |
|---|---|
static org.dom4j.Element |
addXmlNodeAndAttribute(org.dom4j.Element rootElement,
java.lang.String nodeXPath,
java.lang.String attributeName,
java.lang.String attributeValue)
Adds to the rootElement the nodes specified by nodeXPath. |
static void |
addXmlNodesAndAttribute(org.dom4j.Element parentElement,
java.lang.String nodeName,
java.lang.String attributeName,
java.util.Collection<java.lang.String> attributeValues)
Adds multiple nodes to the parent element, one for each attributeValues and each of them with an attribute with the given name and value. |
static DocumentPage |
getDocumentPage(org.dom4j.Node pageNode)
|
static java.lang.String |
getXmlValue(org.dom4j.Document document,
java.lang.String xpath)
|
static java.util.Set<java.lang.String> |
getXmlValues(org.dom4j.Document document,
java.lang.String xpath)
|
static org.dom4j.Document |
parseXmlFile(java.io.File inputFile)
parse the xml input file |
static org.dom4j.Document |
parseXmlFile(java.lang.String fullPath)
Parse the xml file converting the given path |
static org.dom4j.Document |
parseXmlFile(java.net.URL url)
Parse the url |
static org.dom4j.Element |
processXPath(org.dom4j.Element rootElement,
java.lang.String xpath,
java.lang.String attributeValue)
Adds the to rootElement the given xpath and, if the xpath contains an attribute, sets the attribute value. |
static void |
writeXmlFile(org.dom4j.Document domDoc,
java.io.File outFile)
Write the DOM to the xml file |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static DocumentPage getDocumentPage(org.dom4j.Node pageNode)
pageNode -
public static void writeXmlFile(org.dom4j.Document domDoc,
java.io.File outFile)
throws java.io.IOException
domDoc - Document to writeoutFile - xml File to write
java.io.IOException
public static java.lang.String getXmlValue(org.dom4j.Document document,
java.lang.String xpath)
document - xpath -
java.lang.Exception
public static java.util.Set<java.lang.String> getXmlValues(org.dom4j.Document document,
java.lang.String xpath)
document - xpath -
java.lang.Exception
public static org.dom4j.Document parseXmlFile(java.lang.String fullPath)
throws org.dom4j.DocumentException
fullPath -
org.dom4j.DocumentException
public static org.dom4j.Document parseXmlFile(java.io.File inputFile)
throws org.dom4j.DocumentException
inputFile -
org.dom4j.DocumentException
public static org.dom4j.Document parseXmlFile(java.net.URL url)
throws org.dom4j.DocumentException
org.dom4j.DocumentException
public static org.dom4j.Element processXPath(org.dom4j.Element rootElement,
java.lang.String xpath,
java.lang.String attributeValue)
rootElement - xpath - attributeValue -
public static org.dom4j.Element addXmlNodeAndAttribute(org.dom4j.Element rootElement,
java.lang.String nodeXPath,
java.lang.String attributeName,
java.lang.String attributeValue)
rootElement - nodeXPath - attributeName - AttributeValue -
public static void addXmlNodesAndAttribute(org.dom4j.Element parentElement,
java.lang.String nodeName,
java.lang.String attributeName,
java.util.Collection<java.lang.String> attributeValues)
parentElement - nodeName - attributeName - attributeValues -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||