flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
20
BACK_BACK/node_modules/w3c-xmlserializer/README.md
generated
vendored
Executable file
20
BACK_BACK/node_modules/w3c-xmlserializer/README.md
generated
vendored
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
# w3c-xmlserializer
|
||||
|
||||
An XML serializer that follows the [W3C specification](https://w3c.github.io/DOM-Parsing/).
|
||||
|
||||
This module is mostly used as an internal part of [jsdom](https://github.com/jsdom/jsdom). However, you can use it independently with some care. That isn't very well-documented yet, but hopefully the below sample can give you an idea.
|
||||
|
||||
## Basic usage
|
||||
|
||||
```js
|
||||
const { XMLSerializer } = require("w3c-xmlserializer");
|
||||
const { JSDOM } = require("jsdom");
|
||||
|
||||
const { document } = new JSDOM().window;
|
||||
const XMLSerializer = XMLSerializer.interface;
|
||||
const serializer = new XMLSerializer();
|
||||
const doc = document.createElement("akomaNtoso");
|
||||
|
||||
console.log(serializer.serializeToString(doc));
|
||||
// => '<akomantoso xmlns="http://www.w3.org/1999/xhtml"></akomantoso>'
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue