SaveSmartTagAsXml Class

Save Smart Tag Data in XML Property Bag.When the object is serialized out as xml, its qualified name is w:saveSmartTagsAsXml.

Inheritance Hierarchy

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

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

Syntax

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

Remarks

[ISO/IEC 29500-1 1st Edition]

17.15.2.37 saveSmartTagsAsXml (Save Smart Tag Data in XML Property Bag)

This element specifies that the information pertaining to all smart tags () in the current document shall be saved into a separate XML-based property bag at the head of the web page when this WordprocessingML document is saved as a web page.

[Rationale: This setting is typically used when saving documents known to contain smart tags as web pages, in order to allow the smart tag data within the web page to be processed as a separate XML document by a separate parser, even though the actual HTML content of the resulting web page cannot be parsed by an XML-based parser. end rationale]

If this element is omitted, then the smart tag data of this document shall not be saved into a separate XML-compliant property bag within the HTML output when this document is saved as a web page.

[Example: Consider a WordprocessingML document which contains the following content:

DocumentFormat.OpenXml.Wordprocessing.SaveSmartTag

This document might typically write out the following HTML content:

<p>Stock symbol: <st1:stockticker>MSFT</st1:stockticker></p>
<p>Date: <st1:date ls="trans" Month="7" Day="4" Year="2006"">7/4/2006</st1:date></p>

However, if the WordprocessingML document also contains the following content within the web settings part:

<w:webSettings>
<w:saveSmartTagsAsXml w:val="true" />
</w:webSettings>

The saveSmartTagsAsXml element specifies that all smart tags in the document must also be saved into an XML property bag at the header of the file, for example:

<head>
…
  <xml>
<o:DocumentSmartTags>
      <st1:stockticker>MSFT</st1:stockticker>
      <st1:date ls="trans" Month="7" Day="4" Year="2006">7/4/2006</st1:date>
    </o:DocumentSmartTags>
  </xml>
…
</head>

This header information is in addition to the normal HTML output. end example]

Parent Elements

webSettings (§17.15.2.46)

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

SaveSmartTagAsXml Members

DocumentFormat.OpenXml.Wordprocessing Namespace