public class XmlMapping
Property Getters/Setters Summary | ||
---|---|---|
CustomXmlPart | getCustomXmlPart() | |
Returns the custom XML data part to which the parent structured document tag is mapped.
|
||
boolean | isMapped() | |
Returns true if the parent structured document tag is successfully mapped to XML data.
|
||
java.lang.String | getPrefixMappings() | |
Returns XML namespace prefix mappings to evaluate the |
||
java.lang.String | getStoreItemId() | |
Specifies the custom XML data identifier for the custom XML data part which
shall be used to evaluate the |
||
java.lang.String | getXPath() | |
Returns the XPath expression, which is evaluated to find the custom XML node
that is mapped to the parent structured document tag.
|
Method Summary | ||
---|---|---|
void | delete() | |
Deletes mapping of the parent structured document to XML data.
|
||
boolean | setMapping(CustomXmlPart customXmlPart, java.lang.String xPath, java.lang.String prefixMapping) | |
Sets a mapping between the parent structured document tag and an XML node of a custom XML data part.
|
public CustomXmlPart getCustomXmlPart()
public boolean isMapped()
public java.lang.String getPrefixMappings()
public java.lang.String getStoreItemId()
public java.lang.String getXPath()
public void delete()
public boolean setMapping(CustomXmlPart customXmlPart, java.lang.String xPath, java.lang.String prefixMapping) throws java.lang.Exception
customXmlPart
- A custom XML data part to map to.xPath
- An XPath expression to find the XML node.prefixMapping
- XML namespace prefix mappings to evaluate the XPath.Example:
Shows how to create structured document tag with a custom XML data.Document doc = new Document(); // Add test XML data part to the collection. CustomXmlPart xmlPart = doc.getCustomXmlParts().add(UUID.randomUUID().toString(), "<root><text>Hello, World!</text></root>"); StructuredDocumentTag sdt = new StructuredDocumentTag(doc, SdtType.PLAIN_TEXT, MarkupLevel.BLOCK); sdt.getXmlMapping().setMapping(xmlPart, "/root[1]/text[1]", ""); doc.getFirstSection().getBody().appendChild(sdt); doc.save(getMyDir() + "\\Artifacts\\SDT.CustomXml.docx");