Returns the specified attribute as part of the XML declaration, the coding of the file passed as argument.

A null will be returned if it is unknown or not specified, such as when the document was created in memory.

1 dom.document.getXmlEncoding

<dom.document.getXmlEncoding>
    <node_orig /> !
</dom.document.getXmlEncoding>
Example

Get the encoding of the XML file.

Copy
<xsql-script name='dom_getXmlEncoding'>

    <body>

        <set name='node_orig'>
            <dom.parse><file name='data1.xml' type='absolute' /></dom.parse>
        </set>

        <println>
            <dom.document.getXmlEncoding><node_orig/></dom.document.getXmlEncoding>
        </println>

    </body>
</xsql-script>