helper

package
v0.0.0-...-3ca5dd0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2019 License: CC0-1.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMultiLineContent

func AddMultiLineContent(parent xml.Node, content string) error

AddMultiLineContent adds the given content into the provided docx XML node as multiple "paragraphs" of text, split by the newlines.

func ConcatTextNodes

func ConcatTextNodes(textNodes []xml.Node) string

ConcatTextNodes will concatenate the text from an array of text nodes and trim any whitespace from the final result.

func FillCell

func FillCell(cell xml.Node, content string) error

FillCell inserts the given content into the provided docx XML table cell node.

func FillParagraph

func FillParagraph(paragraph xml.Node, content string) (err error)

FillParagraph inserts the given content into the provided docx XML paragraph node. Note that newlines aren't respected - you'll need to create a new paragraph node for each.

func GenerateXML

func GenerateXML(wordDoc *docx.Docx) (xmlDoc *xml.XmlDocument, err error)

GenerateXML gives the underlying XML document for the provided Word document.

func ParseXML

func ParseXML(content []byte) (xmlDoc *xml.XmlDocument, err error)

ParseXML converts the XML text to a structure.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL