Export (0) Print
Expand All

Divs class

Defines the Divs Class. When the object is serialized out as xml, its qualified name is w:divs.

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

public class Divs : DivsType

[ISO/IEC 29500-1 1st Edition]

divs (Information about HTML div Elements)

This element specifies all information about the set of HTML div elements (as well as the body and blockquote elements) which were included in this document, so that that information (which is stored on a logical structure with no direct analog in WordprocessingML) can be maintained when an HTML document is stored in the WordprocessingML format.

The divs element stores the following information about these structures:

  • The parent/child structure of HTML div, blockquote, and body elements

  • The borders for each of these elements

  • The margins for each of these elements

When the resulting WordprocessingML document is displayed by an application, the settings specified by this information shall be reflected in the formatting of the resulting paragraphs (i.e. this information shall not only be used when the document is resaved in the HTML format).

[Example: Consider a simple HTML document defined as follows:

<html>
  <body style="margin-left:200px;margin-top:50px">
    <p>Paragraph one.</p>
    <blockquote style="border: 5px solid #00FFFF">
      <p>Paragraph in a blockquote.</p>
    </blockquote>
    <p>Paragraph two.</p>
  </body>
</html>

This HTML would therefore normally appear as follows (image scaled appropriately):

Now, when this document is saved in the WordprocessingML format, the information stored on the div, blockquote, and body elements is stored in the web setting part as follows:

<w:divs>
  <w:div w:id="1626542603">
    <w:bodyDiv w:val="1" />
    <w:marLeft w:val="3000" />
    <w:marTop w:val="750" />
    …    <w:divsChild>
      <w:div w:id="313534916">
        <w:blockQuote w:val="1" />
        <w:marLeft w:val="720" />
        <w:marRight w:val="720" />
        <w:marTop w:val="100" />
        <w:marBottom w:val="100" />
        <w:divBdr>
          <w:top w:val="single" w:sz="36" w:color="00FFFF" />
          <w:left w:val="single" w:sz="36" w:color="00FFFF" />
          <w:right w:val="single" w:sz="36" w:color="00FFFF" />
          <w:bottom w:val="single" w:sz="36" w:color="00FFFF" />
        </w:divBdr>
      </w:div>
    </w:divsChild>
  </w:div>
</w:divs>

The divs element specifies all of the margin and border information about the necessary HTML structures in the document; in this case, the body element and the nested blockquote. end example]

Parent Elements

webSettings (§17.15.2.46)

Child Elements

Subclause

div (Information About Single HTML div Element)

§17.15.2.6

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

© ISO/IEC29500: 2008.

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

Community Additions

Show:
© 2014 Microsoft