# XML Parsing and Generation > **NOTE:** >The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. ## Modules to Import ``` import xml from '@ohos.xml'; ``` ## Required Permissions None ## XmlSerializer ### constructor constructor\(buffer: ArrayBuffer | DataView, encoding?: string\) A constructor used to create an **XmlSerializer** instance. - Parameters
ArrayBuffer or DataView for storing the XML information to write. |
|||
Options for controlling and obtaining the parsed information. |
Returns true if the element is empty; returns false otherwise. |
Returns true if the text event contains only whitespace characters; returns false otherwise. |