Core\Xml\Writer
Builds a new XML document one node at a time. Core\Xml::writer returns a writer. startDocument begins the document, and endDocument returns it as a string. Between them, startElement and endElement open and close each element. The writer escapes every text and every attribute value for you, and it throws a LogicError for any call that would make the document invalid.
Returned by
You get a Core\Xml\Writer from these methods:
Members
10 members.
| Member | Signature |
|---|---|
startDocument | startDocument(): void |
endDocument | endDocument(): string |
startElement | startElement(string $name): void |
endElement | endElement(): void |
writeText | writeText(string $text): void |
writeAttribute | writeAttribute(string $name, string $value): void |
writeComment | writeComment(string $text): void |
writeCdata | writeCdata(string $text): void |
writeInstruction | writeInstruction(string $target, string $data): void |
writeDoctype | writeDoctype(string $name): void |
