xmlTreeNewDoc

SYNOPSIS

xmlDoc xmlTreeNewDoc(string version)

Parameters:

  • version - the XML version for the doc (usually 1.0 or 1.1)

Returns:

  • the new xmlDoc


DESCRIPTION
xmlTreeNewDoc() is for creating new XML documents from scratch. You must provide a version number, which becomes the version in the XML prolog.


EXAMPLE

<$doc = (xmlTreeNewDoc( '1.0' ))>

Will create a new XML document that will have the following XML prolog: <?xml version="1.0"?>


CAVEATS
While the XML version is determined at document-creation time, the encoding, which also goes in the XML declaration, is determined by parameters when the document is saved/printed. See xmlTreePrintDoc() and xmlTreeSaveDoc() for more information.


SEE ALSO
xmlTreeNewDocFromFile, xmlTreeNewDocFromString, xmlTreePrintDoc, xmlTreeSaveDoc


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.