-
Notifications
You must be signed in to change notification settings - Fork 13
/
Text.xml
359 lines (332 loc) · 16.9 KB
/
Text.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
<Type Name="Text" FullName="DocumentFormat.OpenXml.Wordprocessing.Text">
<TypeSignature Language="C#" Value="public class Text : DocumentFormat.OpenXml.Wordprocessing.TextType" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit Text extends DocumentFormat.OpenXml.Wordprocessing.TextType" />
<TypeSignature Language="DocId" Value="T:DocumentFormat.OpenXml.Wordprocessing.Text" />
<TypeSignature Language="VB.NET" Value="Public Class Text
Inherits TextType" />
<TypeSignature Language="F#" Value="type Text = class
 inherit TextType" />
<AssemblyInfo>
<AssemblyName>DocumentFormat.OpenXml</AssemblyName>
<AssemblyVersion>0.0.1.0</AssemblyVersion>
<AssemblyVersion>2.7.2.0</AssemblyVersion>
<AssemblyVersion>2.8.0.0</AssemblyVersion>
<AssemblyVersion>2.8.1.0</AssemblyVersion>
<AssemblyVersion>2.9.0.0</AssemblyVersion>
<AssemblyVersion>2.9.1.0</AssemblyVersion>
<AssemblyVersion>2.10.0.0</AssemblyVersion>
<AssemblyVersion>2.10.1.0</AssemblyVersion>
<AssemblyVersion>2.11.0.0</AssemblyVersion>
<AssemblyVersion>2.11.1.0</AssemblyVersion>
<AssemblyVersion>2.11.2.0</AssemblyVersion>
<AssemblyVersion>2.11.3.0</AssemblyVersion>
<AssemblyVersion>2.12.0.0</AssemblyVersion>
<AssemblyVersion>2.12.1.0</AssemblyVersion>
<AssemblyVersion>2.12.2.0</AssemblyVersion>
<AssemblyVersion>2.12.3.0</AssemblyVersion>
<AssemblyVersion>2.13.0.0</AssemblyVersion>
<AssemblyVersion>2.13.1.0</AssemblyVersion>
<AssemblyVersion>2.14.0.0</AssemblyVersion>
<AssemblyVersion>2.15.0.0</AssemblyVersion>
<AssemblyVersion>2.16.0.0</AssemblyVersion>
<AssemblyVersion>2.17.1.0</AssemblyVersion>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
<AssemblyVersion>2.19.0.0</AssemblyVersion>
<AssemblyVersion>2.20.0.0</AssemblyVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>3.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>DocumentFormat.OpenXml.Wordprocessing.TextType</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="openxml-2.10.0;openxml-2.10.1;openxml-2.11.0;openxml-2.9.0;openxml-2.9.1">
<AttributeName Language="C#">[DocumentFormat.OpenXml.OfficeAvailability(DocumentFormat.OpenXml.FileFormatVersions.Office2007)]</AttributeName>
<AttributeName Language="F#">[<DocumentFormat.OpenXml.OfficeAvailability(DocumentFormat.OpenXml.FileFormatVersions.Office2007)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="openxml-2.10.0;openxml-2.10.1;openxml-2.11.0;openxml-2.12.0;openxml-2.12.1;openxml-2.12.2;openxml-2.12.3;openxml-2.13.0;openxml-2.13.1;openxml-2.14.0">
<AttributeName Language="C#">[DocumentFormat.OpenXml.SchemaAttr(23, "t")]</AttributeName>
<AttributeName Language="F#">[<DocumentFormat.OpenXml.SchemaAttr(23, "t")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="openxml-2.15.0;openxml-2.16.0;openxml-2.17.1;openxml-2.18.0;openxml-2.19.0;openxml-2.20.0">
<AttributeName Language="C#">[DocumentFormat.OpenXml.SchemaAttr("w:t")]</AttributeName>
<AttributeName Language="F#">[<DocumentFormat.OpenXml.SchemaAttr("w:t")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="openxml-2.7.1;openxml-2.7.2;openxml-2.8.0;openxml-2.8.1;openxml-2.9.0;openxml-2.9.1">
<AttributeName Language="C#">[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]</AttributeName>
<AttributeName Language="F#">[<System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="openxml-3.0.1">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(0)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(0)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="openxml-3.0.1">
<AttributeName Language="C#">[System.Runtime.CompilerServices.NullableContext(1)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.NullableContext(1)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>
<para>Text.</para>
<para>This class is available in Office 2007 and above.</para>
<para>When the object is serialized out as xml, it's qualified name is w:t.</para>
</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
[!INCLUDE[openxmlnoticeiso](~/includes/openxmlnoticeiso.md)]
**t (Text)**
This element specifies that this run contains literal text which shall be displayed in the document. The *t* element shall be used for all text runs which are not:
- Part of a region of text that is contained in a deleted region using the del element (§17.13.5.14)
- Part of a region of text that is contained within a field code
[*Example*: Consider a paragraph of WordprocessingML content which reads *This is text*. This paragraph would therefore be represented as follows:
```xml
<w:p>
<w:r>
<w:t>This is text</w:t>
</w:r>
</w:p>
```
The text is contained in a t node. *end example*]
|Parent Elements|
|---------------------|
|r (§22.1.2.87); r (§17.3.2.25)|
[*Note*: The W3C XML Schema definition of this element’s content model (CT_Text) is located in §A.1. *end note*]
[!INCLUDE[openxmlnoticeiso](~/includes/openxmlcopyrightiso.md)]
## Examples
The following code example creates a document named "TextEx.docx" at the specified path, and writes the phrase "Hello, World!" to it.
```csharp
using System;
using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Wordprocessing;
namespace TextEx
{
class Program
{
static void Main(string[] args)
{
string fileName = @"c:\users\public\documents\TextEx.docx";
// Create a wordprocessing document with the specified file name.
WordprocessingDocument wordprocessingDocument =
WordprocessingDocument.Create(fileName, WordprocessingDocumentType.Document);
// Add a MainDocumentPart object.
MainDocumentPart mainDocumentPart =
wordprocessingDocument.AddMainDocumentPart();
// Creatre the document structure.
mainDocumentPart.Document = new Document();
Document document = mainDocumentPart.Document;
Body body = document.AppendChild(new Body());
Paragraph para = body.AppendChild(new Paragraph());
Run run = para.AppendChild(new Run());
// Write some text to the file.
run.AppendChild(new Text("Hello, World!"));
// Close the document.
wordprocessingDocument.Close();
Console.WriteLine("The document has been created.\nPress a key");
Console.ReadKey();
}
}
}
```
```vb
Imports DocumentFormat.OpenXml
Imports DocumentFormat.OpenXml.Packaging
Imports DocumentFormat.OpenXml.Wordprocessing
Module Module1
Sub Main(ByVal args As String())
Dim fileName As String = "c:\users\public\documents\TextEx.docx"
' Create a wordprocessing document with the specified file name.
Dim wordprocessingDocument As WordprocessingDocument = _
wordprocessingDocument.Create(fileName, WordprocessingDocumentType.Document)
' Add a MainDocumentPart object.
Dim mainDocumentPart As MainDocumentPart = _
wordprocessingDocument.AddMainDocumentPart()
' Creatre the document structure.
mainDocumentPart.Document = New Document()
Dim document As Document = mainDocumentPart.Document
Dim body As Body = document.AppendChild(New Body())
Dim para As Paragraph = body.AppendChild(New Paragraph())
Dim run As Run = para.AppendChild(New Run())
' Write some text to the file.
run.AppendChild(New Text("Hello, World!"))
' Close the document.
wordprocessingDocument.Close()
Console.WriteLine("The document has been created." & vbLf & "Press a key")
Console.ReadKey()
End Sub
End Module
```
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Text ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:DocumentFormat.OpenXml.Wordprocessing.Text.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>DocumentFormat.OpenXml</AssemblyName>
<AssemblyVersion>0.0.1.0</AssemblyVersion>
<AssemblyVersion>2.7.2.0</AssemblyVersion>
<AssemblyVersion>2.8.0.0</AssemblyVersion>
<AssemblyVersion>2.8.1.0</AssemblyVersion>
<AssemblyVersion>2.9.0.0</AssemblyVersion>
<AssemblyVersion>2.9.1.0</AssemblyVersion>
<AssemblyVersion>2.10.0.0</AssemblyVersion>
<AssemblyVersion>2.10.1.0</AssemblyVersion>
<AssemblyVersion>2.11.0.0</AssemblyVersion>
<AssemblyVersion>2.11.1.0</AssemblyVersion>
<AssemblyVersion>2.11.2.0</AssemblyVersion>
<AssemblyVersion>2.11.3.0</AssemblyVersion>
<AssemblyVersion>2.12.0.0</AssemblyVersion>
<AssemblyVersion>2.12.1.0</AssemblyVersion>
<AssemblyVersion>2.12.2.0</AssemblyVersion>
<AssemblyVersion>2.12.3.0</AssemblyVersion>
<AssemblyVersion>2.13.0.0</AssemblyVersion>
<AssemblyVersion>2.13.1.0</AssemblyVersion>
<AssemblyVersion>2.14.0.0</AssemblyVersion>
<AssemblyVersion>2.15.0.0</AssemblyVersion>
<AssemblyVersion>2.16.0.0</AssemblyVersion>
<AssemblyVersion>2.17.1.0</AssemblyVersion>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
<AssemblyVersion>2.19.0.0</AssemblyVersion>
<AssemblyVersion>2.20.0.0</AssemblyVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>3.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>
Initializes a new instance of the Text class.
</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Text (string text);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string text) cil managed" />
<MemberSignature Language="DocId" Value="M:DocumentFormat.OpenXml.Wordprocessing.Text.#ctor(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (text As String)" />
<MemberSignature Language="F#" Value="new DocumentFormat.OpenXml.Wordprocessing.Text : string -> DocumentFormat.OpenXml.Wordprocessing.Text" Usage="new DocumentFormat.OpenXml.Wordprocessing.Text text" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>DocumentFormat.OpenXml</AssemblyName>
<AssemblyVersion>0.0.1.0</AssemblyVersion>
<AssemblyVersion>2.7.2.0</AssemblyVersion>
<AssemblyVersion>2.8.0.0</AssemblyVersion>
<AssemblyVersion>2.8.1.0</AssemblyVersion>
<AssemblyVersion>2.9.0.0</AssemblyVersion>
<AssemblyVersion>2.9.1.0</AssemblyVersion>
<AssemblyVersion>2.10.0.0</AssemblyVersion>
<AssemblyVersion>2.10.1.0</AssemblyVersion>
<AssemblyVersion>2.11.0.0</AssemblyVersion>
<AssemblyVersion>2.11.1.0</AssemblyVersion>
<AssemblyVersion>2.11.2.0</AssemblyVersion>
<AssemblyVersion>2.11.3.0</AssemblyVersion>
<AssemblyVersion>2.12.0.0</AssemblyVersion>
<AssemblyVersion>2.12.1.0</AssemblyVersion>
<AssemblyVersion>2.12.2.0</AssemblyVersion>
<AssemblyVersion>2.12.3.0</AssemblyVersion>
<AssemblyVersion>2.13.0.0</AssemblyVersion>
<AssemblyVersion>2.13.1.0</AssemblyVersion>
<AssemblyVersion>2.14.0.0</AssemblyVersion>
<AssemblyVersion>2.15.0.0</AssemblyVersion>
<AssemblyVersion>2.16.0.0</AssemblyVersion>
<AssemblyVersion>2.17.1.0</AssemblyVersion>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
<AssemblyVersion>2.19.0.0</AssemblyVersion>
<AssemblyVersion>2.20.0.0</AssemblyVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>3.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="text" Type="System.String" />
</Parameters>
<Docs>
<param name="text">Specifies the text content of the element.</param>
<summary>
Initializes a new instance of the Text class with the specified text content.
</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CloneNode">
<MemberSignature Language="C#" Value="public override DocumentFormat.OpenXml.OpenXmlElement CloneNode (bool deep);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class DocumentFormat.OpenXml.OpenXmlElement CloneNode(bool deep) cil managed" />
<MemberSignature Language="DocId" Value="M:DocumentFormat.OpenXml.Wordprocessing.Text.CloneNode(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function CloneNode (deep As Boolean) As OpenXmlElement" />
<MemberSignature Language="F#" Value="override this.CloneNode : bool -> DocumentFormat.OpenXml.OpenXmlElement" Usage="text.CloneNode deep" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>DocumentFormat.OpenXml</AssemblyName>
<AssemblyVersion>0.0.1.0</AssemblyVersion>
<AssemblyVersion>2.7.2.0</AssemblyVersion>
<AssemblyVersion>2.8.0.0</AssemblyVersion>
<AssemblyVersion>2.8.1.0</AssemblyVersion>
<AssemblyVersion>2.9.0.0</AssemblyVersion>
<AssemblyVersion>2.9.1.0</AssemblyVersion>
<AssemblyVersion>2.10.0.0</AssemblyVersion>
<AssemblyVersion>2.10.1.0</AssemblyVersion>
<AssemblyVersion>2.11.0.0</AssemblyVersion>
<AssemblyVersion>2.11.1.0</AssemblyVersion>
<AssemblyVersion>2.11.2.0</AssemblyVersion>
<AssemblyVersion>2.11.3.0</AssemblyVersion>
<AssemblyVersion>2.12.0.0</AssemblyVersion>
<AssemblyVersion>2.12.1.0</AssemblyVersion>
<AssemblyVersion>2.12.2.0</AssemblyVersion>
<AssemblyVersion>2.12.3.0</AssemblyVersion>
<AssemblyVersion>2.13.0.0</AssemblyVersion>
<AssemblyVersion>2.13.1.0</AssemblyVersion>
<AssemblyVersion>2.14.0.0</AssemblyVersion>
<AssemblyVersion>2.15.0.0</AssemblyVersion>
<AssemblyVersion>2.16.0.0</AssemblyVersion>
<AssemblyVersion>2.17.1.0</AssemblyVersion>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
<AssemblyVersion>2.19.0.0</AssemblyVersion>
<AssemblyVersion>2.20.0.0</AssemblyVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>3.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>DocumentFormat.OpenXml.OpenXmlElement</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="deep" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="deep">true to recursively clone the subtree under the specified node; false to clone only the node itself.</param>
<summary>Creates a duplicate of this node.</summary>
<returns>Returns the cloned node.</returns>
<remarks>To be added.</remarks>
<inheritdoc />
</Docs>
</Member>
<Member MemberName="LocalName">
<MemberSignature Language="C#" Value="public override string LocalName { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string LocalName" />
<MemberSignature Language="DocId" Value="P:DocumentFormat.OpenXml.Wordprocessing.Text.LocalName" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property LocalName As String" />
<MemberSignature Language="F#" Value="member this.LocalName : string" Usage="DocumentFormat.OpenXml.Wordprocessing.Text.LocalName" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>DocumentFormat.OpenXml</AssemblyName>
<AssemblyVersion>0.0.1.0</AssemblyVersion>
<AssemblyVersion>2.7.2.0</AssemblyVersion>
<AssemblyVersion>2.8.0.0</AssemblyVersion>
<AssemblyVersion>2.8.1.0</AssemblyVersion>
<AssemblyVersion>2.9.0.0</AssemblyVersion>
<AssemblyVersion>2.9.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>