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) |
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, setVersion
addTargetPart, addTargetPart, addTargetPart, addTargetPart, getContentType, getPartName, getRelationshipsPart, getRelationshipsPart, getUserData, setContentType, setPartName, setRelationships, setUserData
public CustomXmlDataStoragePart(PartName partName) throws InvalidFormatException
InvalidFormatException
public 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.InvalidFormatException
public void init()
public CustomXmlDataStorage getData()
public void setData(CustomXmlDataStorage data)
data
- the data to setpublic boolean isContentEqual(Part other) throws Docx4JException
isContentEqual
in class Part
Docx4JException
public String xpathGetString(String xpath, String prefixMappings) throws Docx4JException
xpathGetString
in interface CustomXmlPart
Docx4JException
public String cachedXPathGetString(String xpath, String prefixMappings) throws Docx4JException
CustomXmlPart
cachedXPathGetString
in interface CustomXmlPart
Docx4JException
discardCacheXPathObject
public void discardCacheXPathObject()
CustomXmlPart
discardCacheXPathObject
in interface CustomXmlPart
public List<Node> xpathGetNodes(String xpathString, String prefixMappings) throws Docx4JException
xpathGetNodes
in interface CustomXmlPart
Docx4JException
public boolean setNodeValueAtXPath(String xpath, String value, String prefixMappings) throws Docx4JException
setNodeValueAtXPath
in interface CustomXmlPart
Docx4JException
public String getXML() throws Docx4JException
getXML
in interface CustomXmlPart
Docx4JException
public String getItemId()
getItemId
in interface CustomXmlPart
Copyright © 2007-2016. All Rights Reserved.