|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.cargo.util.Dom4JXmlFileBuilder
public class Dom4JXmlFileBuilder
This implementation uses @{link Dom4JUtil Dom4JUtil} to manipulate xml files.
| Constructor Summary | |
|---|---|
Dom4JXmlFileBuilder(FileHandler fileHandler)
creates the instance, which will use the specified @{link FileHandler fileHandler} to read or write the xml file. |
|
| Method Summary | |
|---|---|
void |
insertElementsUnderXPath(java.lang.String elementsToParse,
java.lang.String xpath)
this will parse one or more elements from elementToParse and insert them under the xpath. |
void |
loadFile()
load the current xml file into a Document. |
void |
setFile(java.lang.String path)
sets the name of the file we will read and write. |
void |
setNamespaces(java.util.Map namespaces)
assign prefix to namespace mappings used for xpath and other xml operations. |
void |
writeFile()
write the current xml to disk. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Dom4JXmlFileBuilder(FileHandler fileHandler)
fileHandler - used for file i/o.| Method Detail |
|---|
public void setFile(java.lang.String path)
setFile in interface XmlFileBuilderpath - - where the xml file will be read from or written to.
public void insertElementsUnderXPath(java.lang.String elementsToParse,
java.lang.String xpath)
insertElementsUnderXPath in interface XmlFileBuilderelementsToParse - String containing one or more elements in textual formatxpath - where to place the above elements.public void loadFile()
loadFile in interface XmlFileBuilderpublic void writeFile()
writeFile in interface XmlFileBuilderpublic void setNamespaces(java.util.Map namespaces)
setNamespaces in interface XmlFileBuildernamespaces - - key is prefix value is url
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||