Gathering detailed insights and metrics for oms-moddle-xml
Gathering detailed insights and metrics for oms-moddle-xml
Gathering detailed insights and metrics for oms-moddle-xml
Gathering detailed insights and metrics for oms-moddle-xml
npm install oms-moddle-xml
Typescript
Module System
Node Version
NPM Version
76.1
Supply Chain
99.1
Quality
75
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
50 Stars
316 Commits
21 Forks
14 Watchers
5 Branches
19 Contributors
Updated on Jun 28, 2025
Latest Version
1.0.0
Package Id
oms-moddle-xml@1.0.0
Unpacked Size
207.59 kB
Size
53.00 kB
File Count
8
NPM Version
6.14.6
Node Version
12.18.4
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Read and write XML documents described with moddle.
Get the libray via npm
npm install --save moddle-xml
Create a moddle instance
1import Moddle from 'moddle'; 2import { 3 Reader, 4 Writer 5} from 'moddle-xml'; 6 7const model = new Moddle([ myPackage ]);
Use the reader to parse XML into an easily accessible object tree:
1const model; // previously created 2 3const xml = 4 '<my:root xmlns:props="http://mypackage">' + 5 '<my:car id="Car_1">' + 6 '<my:engine power="121" fuelConsumption="10" />' + 7 '</my:car>' + 8 '</my:root>'; 9 10const reader = new Reader(model); 11const rootHandler = reader.handler('my:Root'); 12 13// when 14try { 15 const { 16 rootElement: cars, 17 warnings 18 } = await reader.fromXML(xml, rootHandler); 19 20 if (warnings.length) { 21 console.log('import warnings', warnings); 22 } 23 24 console.log(cars); 25 26 // { 27 // $type: 'my:Root', 28 // cars: [ 29 // { 30 // $type: 'my:Car', 31 // id: 'Car_1', 32 // engine: [ 33 // { $type: 'my:Engine', powser: 121, fuelConsumption: 10 } 34 // ] 35 // } 36 // ] 37 // } 38 39} catch (err) { 40 console.log('import error', err, err.warnings); 41}
Use the writer to serialize the object tree back to XML:
1var model; // previously created 2 3var cars = model.create('my:Root'); 4cars.get('cars').push(model.create('my:Car', { power: 10 })); 5 6var options = { format: false, preamble: false }; 7var writer = new Writer(options); 8 9var xml = writer.toXML(bar); 10 11console.log(xml); // <my:root xmlns:props="http://mypackage"> ... <my:car power="10" /></my:root>
MIT
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
SAST tool detected but not run on all commits
Details
Reason
Found 6/11 approved changesets -- score normalized to 5
Reason
7 existing vulnerabilities detected
Details
Reason
0 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 1
Reason
dependency not pinned by hash detected -- score normalized to 1
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More