Skip to content

Instantly share code, notes, and snippets.

@mauskin
Last active October 29, 2021 13:55
Show Gist options
  • Save mauskin/8bfa1aa1903595319e8cbcbf10ccb180 to your computer and use it in GitHub Desktop.
Save mauskin/8bfa1aa1903595319e8cbcbf10ccb180 to your computer and use it in GitHub Desktop.
XMLWriter Functions Organized by What They Do

openMemory — Create new xmlwriter using memory for string output
openUri — Create new xmlwriter using source uri for output

setIndentString — Set string used for indenting
setIndent — Toggle indentation on/off

startDocument — Create document tag
endDocument — End current document

text — Write text
writeRaw — Write a raw XML text
flush — Flush current buffer

outputMemory — Returns current buffer
startElement — Create start element tag
startElementNs — Create start namespaced element tag
endElement — End current element
fullEndElement — End current element
writeElementNs — Write full namespaced element tag
writeElement — Write full element tag

startAttributeNs — Create start namespaced attribute
startAttribute — Create start attribute
endAttribute — End attribute
writeAttributeNs — Write full namespaced attribute
writeAttribute — Write full attribute

startCdata — Create start CDATA tag
endCdata — End current CDATA
writeCdata — Write full CDATA tag

startComment — Create start comment
endComment — Create end comment
writeComment — Write full comment tag

startDtdAttlist — Create start DTD AttList
endDtdAttlist — End current DTD AttList
writeDtdAttlist — Write full DTD AttList tag

startDtdElement — Create start DTD element
endDtdElement — End current DTD element
writeDtdElement — Write full DTD element tag

startDtdEntity — Create start DTD Entity
endDtdEntity — End current DTD Entity
writeDtdEntity — Write full DTD Entity tag

startDtd — Create start DTD tag
endDtd — End current DTD
writeDtd — Write full DTD tag

startPi — Create start PI tag
endPi — End current PI
writePi — Writes a PI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment