import { stringify } from "https://deno.land/x/xml@4.0.0/stringify.ts";
XML stringifier
Convert a udocument into a string
.
StringifierOptions can be used to customize the stringifier behavior.
Examples
Example 1
Example 1
import { stringify } from "./stringify.ts"
console.log(stringify({
root: {
"#comment": "This is a comment",
text: "hello",
array: ["world", "monde", "ไธ็", "๐"],
number: 42,
boolean: true,
complex: {
"@attribute": "value",
"#text": "content",
},
},
}))
Parameters
content: udocument
optional
options: StringifierOptions