XML Element (Microsoft Office)

Contains Extensible Markup Language (XML) elements.

Attribute Description
xmlns The attribute name has a colon and alphabetic letter suffix specifying the XML namespace character. More than one xmlns attribute can be specified, and each attribute specifies the XML schema used by the elements of a namespace.

Contained In

Head (HTML)

Subelements

Microsoft Office: CustomDocumentProperties, DocumentProperties, File, MainFile, OfficeDocumentSettings

Microsoft Excel: ConditionalFormatting, DataValidation, ExcelName, ExcelWorkbook, PivotCache, PublishObjects, Sorting, SupBook, WebChart, WorksheetOptions

Microsoft PowerPoint: Presentation

Microsoft Word: WordDocument

Remarks

The XML element contains one or more subelements. This element can also be contained in files named cachedata.xml and filelist.xml.

For more information about XML, see the Extensible Markup Language (XML) Recommendation.

Example

This example shows XML document property elements specifying the authors, the company, the version, and when the document was created, printed, and saved.


><xml>
 <o:DocumentProperties>
  <o:Author>Nancy Davolio</o:Author>
  <o:LastAuthor>Robert King</o:LastAuthor>
  <o:LastPrinted>1999-05-13T01:33:34Z</o:LastPrinted>
  <o:Created>1999-05-13T01:32:34Z</o:Created>
  <o:LastSaved>1999-05-14T21:52:31Z</o:LastSaved>
  <o:Company>Microsoft Corp.</o:Company>
  <o:Version>9.2720</o:Version>
 </o:DocumentProperties>
</xml>

This example shows the contents of the filelist.xml file. It lists the main file, print.htm, and its two supporting files, img001.png and filelist.xml.


 <xml xmlns:o="urn:schemas-microsoft-com:office:office">
  <o:MainFile HRef="../print.htm"/>
  <o:File HRef="img001.png"/>
  <o:File HRef="filelist.xml"/>
 </xml>

The following example shows the XML element in a cachedata.xml file. Five namespaces are specified: dt, rs, s, x, and z.


<xml xmlns:x="urn:schemas-microsoft-com:office:excel"
 xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
 xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
 xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
...
</xml>