SYNOPSISxmlDoc xmlTreeNewDoc(string version)
Parameters:
version
- the XML version for the doc (usually 1.0
or 1.1
)
Returns:
xmlDoc
DESCRIPTIONxmlTreeNewDoc()
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 ALSOxmlTreeNewDocFromFile
,
xmlTreeNewDocFromString
,
xmlTreePrintDoc
,
xmlTreeSaveDoc