public final class CustomXmlDataStoragePart extends Part implements CustomXmlPart
contentType, partName, relationships| Constructor and Description |
|---|
CustomXmlDataStoragePart() |
CustomXmlDataStoragePart(PartName partName) |
CustomXmlDataStoragePart(Parts parts)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
String |
cachedXPathGetString(String xpath,
String prefixMappings)
Use org.apache.xpath.CachedXPathAPI, since this is much quicker than default javax.xml.xpath.XPath implementations
(Apache's anyway) for large XML files.
|
void |
discardCacheXPathObject()
Use this to null out the org.apache.xpath.CachedXPathAPI object, which you should do
if you've changed your source document, or want to reclaim memory.
|
CustomXmlDataStorage |
getData() |
String |
getItemId() |
String |
getXML()
Get the XML as a String.
|
void |
init() |
boolean |
isContentEqual(Part other) |
void |
remove()
Remove this part from the pkg.
|
void |
setData(CustomXmlDataStorage data) |
boolean |
setNodeValueAtXPath(String xpath,
String value,
String prefixMappings) |
void |
setXML(Document xmlDocument)
Set the XML
|
List<Node> |
xpathGetNodes(String xpathString,
String prefixMappings) |
String |
xpathGetString(String xpath,
String prefixMappings) |
getContentLengthAsLoaded, getOwningRelationshipPart, getPackage, getRelationshipType, getSourceRelationship, getSourceRelationships, getVersion, rename, setContentLengthAsLoaded, setOwningRelationshipPart, setPackage, setPartShortcut, setRelationshipType, setSourceRelationship, setVersionaddTargetPart, addTargetPart, addTargetPart, addTargetPart, getContentType, getPartName, getRelationshipsPart, getRelationshipsPart, getUserData, reset, setContentType, setPartName, setRelationships, setUserDatapublic CustomXmlDataStoragePart(PartName partName) throws InvalidFormatException
InvalidFormatExceptionpublic CustomXmlDataStoragePart()
throws InvalidFormatException
InvalidFormatException@Deprecated public CustomXmlDataStoragePart(Parts parts) throws InvalidFormatException
parts - The parts present in the package to which this will be added.
If for example /customXml/item1.xml already exists, this allows
the name /customXml/item2.xml to be generated.InvalidFormatExceptionpublic void init()
public CustomXmlDataStorage getData()
public void setData(CustomXmlDataStorage data)
data - the data to setpublic boolean isContentEqual(Part other) throws Docx4JException
isContentEqual in class PartDocx4JExceptionpublic String xpathGetString(String xpath, String prefixMappings) throws Docx4JException
xpathGetString in interface CustomXmlPartDocx4JExceptionpublic String cachedXPathGetString(String xpath, String prefixMappings) throws Docx4JException
CustomXmlPartcachedXPathGetString in interface CustomXmlPartDocx4JExceptiondiscardCacheXPathObjectpublic void discardCacheXPathObject()
CustomXmlPartdiscardCacheXPathObject in interface CustomXmlPartpublic List<Node> xpathGetNodes(String xpathString, String prefixMappings) throws Docx4JException
xpathGetNodes in interface CustomXmlPartDocx4JExceptionpublic boolean setNodeValueAtXPath(String xpath, String value, String prefixMappings) throws Docx4JException
setNodeValueAtXPath in interface CustomXmlPartDocx4JExceptionpublic String getXML() throws Docx4JException
getXML in interface CustomXmlPartDocx4JExceptionpublic void setXML(Document xmlDocument) throws Docx4JException
setXML in interface CustomXmlPartDocx4JExceptionpublic String getItemId()
getItemId in interface CustomXmlPartCopyright © 2007-2022. All Rights Reserved.