![]() You can choose whether the generated XML is formatted or not, and how. This method doesn’t belong to the original class. ![]() Generates a real XMLDocument from the writer. Shortcut method, creates an element, adds the text and closes it.Īdds a text node wrapped with CDATA, to the active element.Īdds a comment node to the active element. writeElementString( string name, string txt ).writeAttributeString( string attr, string value ).A namespace can be specified.Ĭloses the active element and goes up one level. writeStartElement( string name )Ĭreates a new node element with this name, and it becomes the active element.If specified, a doctype will be included in the generated xml, in this form: Opens a new document, must be call on start, if standalone is specified, standalone=”true/false” will be added to the header.Ĭloses the active document, it’s not really mandatory to call it.Īdds a doctype to the document, can be called at anytime. ![]() ![]() Var xw = new XMLWriter( 'UTF-8', '1.0' ) Ĭlass instances have the following methods: The constructor accepts 2 optional arguments: encoding, and version. The script is heavily commented for complete understanding. This is not a port, but a reduced and adapted version. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |