Compartir a través de


SaveXmlDataOnly Class

Only Save Custom XML Markup.When the object is serialized out as xml, its qualified name is w:saveXmlDataOnly.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.OnOffType
        DocumentFormat.OpenXml.Wordprocessing.SaveXmlDataOnly

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
Public Class SaveXmlDataOnly _
    Inherits OnOffType
'Usage
Dim instance As SaveXmlDataOnly
public class SaveXmlDataOnly : OnOffType

Remarks

[ISO/IEC 29500-1 1st Edition]

17.15.1.77 saveXmlDataOnly (Only Save Custom XML Markup)

This element specifies that the contents of this document shall be saved as an XML file containing only the custom XML markup in this document in its regular form. The resulting document does not conform to ISO/IEC 29500 (i.e. this is an export-only save option for a WordprocessingML document).

[Rationale: This setting is typically used to extract custom XML markup from a WordprocessingML document for further processing by XML-enabled applications. end rationale]

If this element is omitted, then the contents of the entire document (not just custom XML markup) should be saved according to the definition of WordprocessingML in ISO/IEC 29500.

[Example: Consider a WordprocessingML document which should be saved as an XML file containing only its custom XML markup. This requirement is specified using the following WordprocessingML fragment in the document settings:

<w:saveXmlDataOnly w:val="true"/>

The saveXmlDataOnly element's val attribute has a value of true specifying that only custom XML must be saved into a regular XML file when saving this document. For example, the document body formerly looked like this:

<w:body>
<w:p>
<w:customXml w:element="root" w:namespaceuri="urn:example">
<w:r>
<w:t>Hello world</w:t>
</w:r>
</w:customXml>
</w:p>
</w:body>

The presence of this element specifies that the resulting document only contains the custom Xml markup, resulting in the following:

<ns0:root xmlns:ns0="urn:example">Hello world</ns0:root>

end example]

Parent Elements

settings (§17.15.1.78)

This element’s content model is defined by the common boolean property definition in §17.17.4.

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

SaveXmlDataOnly Members

DocumentFormat.OpenXml.Wordprocessing Namespace