Skip to content

Commit

Permalink
XML parser includes attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
mithray committed Nov 18, 2022
1 parent 1a60f9b commit b5e6c4a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,3 @@ export const load =


}

//let url = "0ad/mods/public/simulation/templates/mixins/"
//console.log(await load("./ignored",{formats: ["json"]}))
//console.log(await load(url,{formats:["xml"]}))
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "load-object",
"version": "1.8.4",
"version": "1.8.5",
"description": "Takes a path to a file locally or remotely and loads that file into a Javascript Object.",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { parse as parseHTML } from "parse5"
import { XMLParser } from "fast-xml-parser"
//import * as cheerio from "cheerio"

const parseXMLInstance = new XMLParser()
const parseXMLInstance = new XMLParser({ignoreAttributes: false})
const parseXML = (str) => parseXMLInstance.parse(str)

const parseJSON = JSON.parse
Expand Down

0 comments on commit b5e6c4a

Please sign in to comment.