ddn.odf.content
Content body parsing and serialisation for ODF documents.
Handles the content.xml stream inside an ODF package, which contains the actual document content (text, tables, slides, etc.) along with automatic styles, font-face declarations, and scripts.
Types 3
structOdfScripts
Represents the office:scripts section of content.xml.
Scripts are preserved as raw XML.
Fields
XmlElement[] scriptElementsstructOdfBody
Represents the body of an ODF document (office:body).
The body contains exactly one family-specific root element (office:text, office:spreadsheet, office:presentation, office:drawing, or office:chart).
Fields
XmlElement contentElementRaw XML element of the family-specific body content.Methods
structOdfContent
Represents the parsed content of an ODF content.xml stream.
Contains the body, automatic styles, font-face declarations, and scripts from the office:document-content root element.
Fields
OdfBody bodyOdfStyles autoStylesFontFace[] fontFacesOdfScripts scriptsstring version_XmlElement[] unknownChildrenMethods
Functions 7
fn
OdfContent parseContent(const(ubyte)[] xmlBytes)Parses raw `content.xml` bytes into an `OdfContent` struct.fn
OdfContent parseContentString(string xml)Parses a `content.xml` string into an `OdfContent` struct.fn
string serializeContent(const ref OdfContent content)Serialises an `OdfContent` back to an XML string.