Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 8, 2024 via pnpm

js2xmlparser 5.0.0

Parses JavaScript objects into XML
Package summary
Share
0
issues
1
license
2
Apache-2.0
Package created
11 Aug 2012
Version published
20 Sep 2022
Maintainers
1
Total deps
2
Direct deps
1
License
Apache-2.0

Issues

0
This package has no issues

Licenses

Apache License 2.0

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
use-patent-claims
place-warranty
Cannot
hold-liable
use-trademark
Must
include-copyright
include-license
state-changes
include-notice
2 Packages, Including:
js2xmlparser@5.0.0
xmlcreate@2.0.4
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of js2xmlparser 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
xmlcreate2.0.423.18 kBApache-2.0
prod

Visualizations

Frequently Asked Questions

What does js2xmlparser do?

The js2xmlparser is a powerful Node.js module designed to parse JavaScript objects into XML. Primarily built for JSON-type objects, this tool is also capable of deciphering other JavaScript objects - such as Date and RegExp by leveraging their toString function. Additionally, unique XML constructs such as attributes, mixed content, and duplicate elements can also be parsed by js2xmlparser. It even supports Map and Set objects introduced in ECMAScript 2015 and also offers pretty-printing of XML outputs.

How do you use js2xmlparser?

To work with js2xmlparser, you should start by installing it via npm. That can be achieved with the npm install command as follows:

npm install js2xmlparser

Once the installation is done, you can require the module and start using it in your script to convert your JavaScript objects into XML:

var js2xmlparser = require("js2xmlparser");

var obj = {
    "@": {
        type: "natural",
    },
    firstName: "John",
    lastName: "Smith",
    dateOfBirth: new Date(1964, 7, 26),
    //...
};

console.log(js2xmlparser.parse("person", obj));

The parse function provided by js2xmlparser accepts two parameters: the root node name and the object to parse into XML. The above code will transform your JavaScript object into a structured XML, making your data easily consumable for XML based systems or services.

Where are the js2xmlparser docs?

The documentation for js2xmlparser, which provides a more in-depth guide on the package's functionalities, benefits, and usage is available on the author's website. The link for the documentation is here. Additionally, it's also possible to generate the documentation locally by using the npm run-script docs command:

npm run-script docs

It's important to note that a good understanding of the docs will facilitate an enhanced utilization of js2xmlparser in your development projects.