wordOpenXMLMinimal property

StructuredDocumentTagRangeStart.wordOpenXMLMinimal property

Gets a string that represents the XML contained within the node in the SaveFormat.FlatOpc format.

Unlike the StructuredDocumentTagRangeStart.wordOpenXML property, this method generates a stripped-down document that excludes any non-content-related parts.

get wordOpenXMLMinimal(): string

Examples

Shows how to get minimal XML contained within the node in the FlatOpc format.

let doc = new aw.Document(base.myDir + "Multi-section structured document tags.docx");
let tag = doc.getChild(aw.NodeType.StructuredDocumentTagRangeStart, 0, true).asStructuredDocumentTagRangeStart();

expect(tag.wordOpenXMLMinimal.includes("<pkg:part pkg:name=\"/docProps/app.xml\" pkg:contentType=\"application/vnd.openxmlformats-officedocument.extended-properties+xml\">"))
  .toEqual(true);
expect(tag.wordOpenXMLMinimal.includes("xmlns:w16cid=\"http://schemas.microsoft.com/office/word/2016/wordml/cid\"")).toEqual(false);

See Also