[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.XmlMapping

XmlMapping Class

Specifies the information which shall be used to establish a mapping between a content control and an XML node stored within a Custom XML Data part in the document.

Inheritance
XmlMapping
Namespace: GrapeCity.Documents.Word
Assembly: DS.Documents.Word.dll
Syntax
public class XmlMapping
Public Class XmlMapping

Properties

Name Description
CustomXmlPartId

Gets the identifier of the CustomXmlPart which shall be used to evaluate the given XPath property. If specified, then the XPath expression specified in the XPath property shall only be evaluated against the custom XML part whose properties part has a matching identifier. If no custom XML part exists with a matching identifier, then the XML mapping shall not be connected. If value is null or empty, then the XPath expression shall be evaluated against each custom XML data part in turn until the given XPath expression is resolved to an XML node.

IsMapped

Gets whether a mapping between a content control and an XML node stored within a Custom XML Data part in the document is established successfully.

PrefixMappings

Gets the set of prefix mappings which shall be used to interpret the XPath expression specified on the XPath property when the XPath expression is evaluated against the custom XML data parts in the document. This property value shall be specified using the following syntax: xmlns:prefix='namespace', where prefix is the namespace prefix to be mapped, and namespace is the namespace to be mapped to the current prefix. Each prefix mapping shall be delimited by one or more whitespace characters.

SupportRichTextControl

Gets whether the xml mapping supports a content control with RichText type. if false (default), the rich text content controls are not supported, so no data stored in the XML node is mapped for this kind of controls. if true, the data stored in the XML node will be an escaped string comprised of a flattened document representing the formatted data in the content control range.

XPath

Gets the XPath expression which shall be evaluated to find the custom XML node which is mapped to the content control. This XPath expression shall be specified using the syntax defined in the XML Path Language (XPath) Version 1.0 specification.

Methods

Name Description
Clear()

Removes mapping between a content control and an XML node stored within a Custom XML Data part in the document.

Equals(object)

Determines whether the specified object is equal to the current object.

GetHashCode()

Serves as the default hash function.

SetMapping(string, string, string, bool)

Set mapping between a content control and an XML node stored within a Custom XML Data part in the document.

SetMapping(XmlNode, string, bool)

Set mapping between a content control and an XML node stored within a Custom XML Data part in the document.

SetMapping<T>(Expression<Func<T>>, bool)

Set mapping between a content control and an XML node stored within a Custom XML Data part in the document.

TryGetValue(out string)

Tries get inner xml of the mapped node stored within a XmlDocument in the document.

TrySetValue(string)

Tries set inner xml to the mapped node stored within a XmlDocument in the document.