Skip to content

Commit

Permalink
separate v4 docs
Browse files Browse the repository at this point in the history
  • Loading branch information
amitguptagwl committed Nov 16, 2021
1 parent d02b12d commit 57a72bb
Show file tree
Hide file tree
Showing 4 changed files with 709 additions and 224 deletions.
217 changes: 0 additions & 217 deletions docs/2.XMLparseOptions.md

This file was deleted.

18 changes: 11 additions & 7 deletions docs/1.GettingStarted.md → docs/v4/1.GettingStarted.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Fast XML Parser is a javascript library to parse XML into JS Object, JSON or to build XML from JS Object without losing any information.

The aim of this library is to provide fast error free solution to deal with XML in javascript.
The aim of this library is to provide fast error free solution to deal with XML data format in javascript.

## Setup

Expand All @@ -22,11 +22,15 @@ To use it in Browser
<small>This documentation is based on how you can use FXP(fast-xml-parser) in node js.</small>

```js
const parser = require('fast-xml-parser');
const fs = require('fs');

const xmlDataStr = fs.readFileSync("./sample.xml").toString();
let jsonObj = parser.parse(xmlDataStr);
const {XMLParser, XMLBuilder, XMLValidator} = require('fast-xml-parser');

if(XMLValidator.validate(){
const parser = new XMLParser();
let jsonObj = parser.parse(xmlData);

const builder = new XMLBuilder();
let samleXmlData = builder.build(jsonObj);
}
```
[> Next: Options to parse XML](./2.XMLparseOptions.md)
[> Next: XmlParser](./2.XMLparseOptions.md)
Loading

0 comments on commit 57a72bb

Please sign in to comment.