Method XmlNode():getEncoding() Foundation

Gets the character encoding of the XML document.

:getEncoding() --> cEncoding | NIL

A character string with the character encoding specified in declaration of the XML document. If no encoding is specified, the method returns NIL.


The method :getEncoding() can be used to retrieve the character encoding specified in the declaration of the XML document. Character sets often used for encoding XML documents are "UTF-8" and "ISO-8859-1" - "ISO-8859-9".

Character set names are case-insentive.

:getEncoding() can be called on any node of an XML document. The method then locates the document node for getting the encoding in the XML document definition. If the node object is not associated with any XML document, that is, if the node is a part of an XML graph without a document node, :getEncoding() returns NIL.


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.