Compartir a través de


FieldCode Class

Field Code.When the object is serialized out as xml, its qualified name is w:instrText.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.OpenXmlLeafTextElement
        DocumentFormat.OpenXml.Wordprocessing.TextType
          DocumentFormat.OpenXml.Wordprocessing.FieldCode

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

Syntax

'Declaración
Public Class FieldCode _
    Inherits TextType
'Uso
Dim instance As FieldCode
public class FieldCode : TextType

Remarks

[ISO/IEC 29500-1 1ª edición]

17.16.18 instrText (Field Code)

This element specifies that this run contains field codes (§17.16.5) within a complex field in the document.

If this element is contained within a run which is not part of a complex field's field codes, then it and its contents should be treated as regular text. If this element is contained within a del element, then the document is non-conformant.

[Example: Consider a complex checkbox field within a WordprocessingML. This field would be represented as follows:

<w:r>
<w:fldChar w:fldCharType="begin" />
</w:r>
<w:r>
<w:instrText>FORMCHECKBOX</w:instrText>
</w:r>
<w:r>
<w:fldChar w:fldCharType="separate" />
</w:r>
…
<w:r>
<w:fldChar w:fldCharType="end" />
</w:r>

The field code is contained in an instrText node which occurs within the field codes portion of the complex field (i.e. before the separator character). end example]

Parent Elements

r (§22.1.2.87); r (§17.3.2.25)

Attributes

Description

xml:space (Content Contains Significant Whitespace)

Namespace: http://www.w3.org/XML/1998/namespace

Specifies how white space should be handled for the contents of this element using the W3C space preservation rules.

[Example: Consider the following run contained within a WordprocessingML document:

<w:r>
<w:t>   significant whitespace   </w:t>
</w:r>

Although there are three spaces on each side of the text content in the run, that whitespace has not been specifically marked as significant, therefore it is subject to the space preservation rules currently specified in that run's scope. end example]

The possible values for this attribute are defined by §2.10 of the XML 1.0 specification.

[Note: The W3C XML Schema definition of this element's content model (CT_Text) is located in §A.1. end note]

© ISO/IEC29500: 2008. Los extractos anteriores han sido traducidos del inglés al español por Microsoft (o algunos de sus agentes) e ISO no asume ningún tipo de responsabilidad por dichas traducciones.

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

FieldCode Members

DocumentFormat.OpenXml.Wordprocessing Namespace