1.0.0 • Published 12 days ago

@hutechtechnical/officia-non-quas-architecto v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
12 days ago

@hutechtechnical/officia-non-quas-architecto

Known Vulnerabilities NPM quality Coverage Status NPM total downloads

Validate XML, Parse XML to JS Object, or Build XML from JS Object without C/C++ based libraries and no callback.

XML Parser v5 is added for experimental use https://solothought.com

Sponsor this project 👉

Current Sponsors

Check the complete list at ThankYouBackers for our sponsors and supporters.

Through Github

Through OpenCollective

Users

Check the bigger list

The list of users is collected either from the list published by Github, communicated directly through mails/chat , or from other resources. If you feel that your name in the above list is incorrectly published or you're not the user of this library anymore then you can inform us to remove it. We'll do the necessary changes ASAP.

If you want to be an anonymous user of this application and don't want to be highlighted anywhere then you can contact me at

Main Features

  • Validate XML data syntactically
  • Parse XML to JS Object
  • Build XML from JS Object
  • Works with node packages, in browser, and in CLI (press try me button above for demo)
  • Faster than any other pure JS implementation.
  • It can handle big files (tested up to 100mb).
  • Controlled parsing using various options
  • XML Entities, HTML entities, and DOCTYPE entites are supported.
  • unpaired tags (Eg <br> in HTML), stop nodes (Eg <script> in HTML) are supported.
  • You can restore almost same XML from JSON
  • Supports comments
  • It can preserve Order of tags in JS object
  • You can control if a single tag should be parsed into array.
  • Supports parsing of PI (Processing Instruction) tags with XML declaration tags
  • And many more other features.

v5

I developed v5 in Apr 2023. And I didn't get the chance to complete all the features. I've ensured that new features don't impact performance. With v5, you have more control on parsing output. Check docs for syntax help and basic understanding.

Please leave a comment in discussion forum for your suggestions and if you really need v5.

How to use

To use as package dependency $ npm install @hutechtechnical/officia-non-quas-architecto or $ yarn add @hutechtechnical/officia-non-quas-architecto

To use as system command $ npm install @hutechtechnical/officia-non-quas-architecto -g

To use it on a webpage include it from a CDN

Example

As CLI command

$ fxparser some.xml

In a node js project

const { XMLParser, XMLBuilder, XMLValidator} = require("@hutechtechnical/officia-non-quas-architecto");

const parser = new XMLParser();
let jObj = parser.parse(XMLdata);

const builder = new XMLBuilder();
const xmlContent = builder.build(jObj);

In a HTML page

<script src="path/to/fxp.min.js"></script>
:
<script>
  const parser = new fxparser.XMLParser();
  parser.parse(xmlContent);
</script>

Check lib folder for different browser bundles

Bundle NameSize
fxbuilder.min.js5.2K
fxparser.js50K
fxparser.min.js17K
fxp.min.js22K
fxvalidator.min.js5.7K

Documents

v3

v4 1. GettingStarted.md 2. XML Parser 3. XML Builder 4. XML Validator 5. Entities 6. HTML Document Parsing 7. PI Tag processing

Performance

XML Parser

npm.io

  • Y-axis: requests per second
  • X-axis: File size

Large files npm.io

  • Y-axis: requests per second
  • X-axis: File size

XML Builder

npm.io

  • Y-axis: requests per second

negative means error

npm.io

Supporters

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Backers

Thank you to all our backers! 🙏 [Become a backer]

License

  • MIT License

Donate $5

mkdireast-asian-widthmkdirpthrottleclientjslockfileprotocol-buffersstableregulartsagentBigInt64ArrayloggingEStrimStartmoduleseslint-pluginwrapgetPrototypeOfjQuerytelephonedragtapenametypedloadbalancingpersistentpluginMicrosoftPushRxJSdateFunction.prototype.nameObject.definePropertymochaWeakMapassignframerSymbolECMAScript 2019deep-clonecreateisConcatSpreadablemergetestreact animationdeepcopyframeworkfastifystreamsgenericsfile systemECMAScript 2015typeerrormetadataloadingschemeawait.envconfigappESnextes-shimssharedarraybufferWeakSetposedirectoryschemapreserve-symlinkscall-boundBigUint64ArrayclisqstoolseventDispatcherexecutablegetterdeterministicstartmulti-packagepushxtermairbnbdeepcolourgesturesreact-hookswritablepropproxyiamelectronjasminemovelimitrapidstylingfetchcompilerReflect.getPrototypeOfgroupBycharactereslintconfigjsondescriptorsremovetrimEndapiconfigurablechaispeedArray.prototype.includeslook-upSetfpsconvertsomeECMAScript 7ecmascriptargvtddredirectbannerstreams2RegExp.prototype.flagsconcurrencysymbolES2021shebangflatMapdomregular expressionsiteratora11yrouteprivateiconvreducevestextendawsintrinsiceslintplugintypeofdefinePropertypackagesrfc4122mime-dbglobstringfiglettoStringTagrecursivefromhardlinkslibphonenumbersequencesimpledbbatchcss-in-jsES2017flagsutilitysymbolsboundwebgetoptFloat64ArraybyteLengthreduxArray.prototype.flatMapsyntaxec2ArrayBuffer#sliceprefiximmereditorstoragegatewayES2022optimizeroncematchescapeInt8ArrayautoscalingroutingString.prototype.matchAllCSSStyleDeclarationdebugassertsswfttyString.prototype.trimformatES2019validateinternal slotfindupautoprefixerprettylintstylesearchopenerfind-upargparsehashviewwalkCSSasciitypeutilitiesregexcolorsdatastructure@@toStringTagobjoptionspinnereventEmitternodejsvisualfolderECMAScript 3trimLeftfastfunctionsesstyleguideparentsrgbcircularimmutablejsonpathisargumentsarraysscheme-validationloggerwalkingtypedarraysAsyncIteratorObject.keystoSorted3dlastemitexecparserredactunicodebufferfilesidejapanesespinnersutil.inspectcjkinternaliterate__proto__ArrayObservablesrandomES5sharedpolyfilles8deletepnpm9formattingmakeES7private dataenumerablecloudtrailcallboundeslintjavascripttouchargsfast-cloneicuStreamsphonetypesafetimelaunchform-validationmimecheckrm -rfanimationreact-hook-formwordwrapdotenvvalidArray.prototype.flattencore-jspopmotionentriesHyBiformsserializerespreearraybufferajvECMAScript 2018superstructoptimistfindLastquotearrayawesomesaucematchAlljoimoduleassertreact posesafeinputfulltyped arrayvaluesopenslogpackage managerwaitstringifierstreamobjectcloneprunebrowserslistes2016promisepromisesenderimportECMAScript 6RxindicatorObject.entrieserrors3settercallbackcode pointsECMAScript 2023avashimreadablestreamfastcopyreactdefaultnpmnegativeECMAScript 2021writenopeES2015getintrinsicsettingsArray.prototype.filterrmdescriptorregexppropertiesdebuggerhas-ownserializationObject.getPrototypeOfconsumedeepcloneslotassertioncensorurlsUint8ClampedArraybusygetgraphqlES3inferencechildYAMLthreeexpressionStyleSheetrmdircloudformationshrinkwraphttpstatelessfull-widthcallworkflowpostcss-plugincodesextensionES2023progressxdgcloudsearchtakeECMAScript 2022typesArray.prototype.findLastIndexclass-validatorReactiveExtensionsMapwarninghigher-orderbyteOffsetcopyes2017slicedayjsstructuredClonewafequallistenersaccessibilityObservablewgetbundlerperformantstarterartqstrimRightgroupReactiveXsortedInt32ArrayexpressmkdirsbundlingJSON-Schemapackage.jsondropkoreansymlinksflagUnderscorethroatyamllooktypescriptes2018pathfast-deep-copyponyfillresolveECMAScript 2020httpsrequestidsuperagentes-abstractObject.assignenvURLsetPrototypeOfapollomonorepohookformglacierdiffarktypeargumentstylesweakmapfastclonesetfilterchromeWebSocketsflatrequirereadRFC-6455ECMAScript 5negative zerolinewrapdataview-0environmentsJSONdependency managerlocationhasOwnPromiselazyiterationroute53mimetypeschineseinglobalpackagedefinetoolkitchanneles-shim APIi18nratelimitURLSearchParamscommand-linefunction.lengthcacheinstallvariablesinvariantInt16ArraybddES2016tostringtagfunctionsdeep-copyexecontainsfixed-widthjsxcloudwatchstyled-componentsvalueRegExp#flagscharactersuninstallcssTypedArraylengthparentcall-bindquerycolumnio-tsshellvpccoerciblecollection.es6bytetoArrayjsdiffconcathasOwnPropertyES2020weaksetcloudfront[[Prototype]]waapixhrTypeBoxspringjestbrowserlistpyyamlTypeScriptcommanddiransiregular expressiontoobjectes2015robustinspectbindpipeflattencallbindterminalgdprastIteratorcomputed-typesArray.prototype.containsnamescorekeyformcurllrufindtesting$.extendbluebirdspawnbreakhaswebsiteowndynamodbkinesisforEachparsingArray.prototype.findLastfindLastIndexnodewhichtesterworkeremojiduplexfast-copyrm -frxdg-openqueueArrayBuffer.prototype.slicemapreduceconsoleconcatMapprotoajaxwhatwgzeroaccessorreducermomentvarsECMAScript 2016syntaxerrorlanguagerdstypaniontslibqueueMicrotaskzodtypedarrayopensnstrimoutputemrtapreal-timeUint16Arrayequality
1.0.0

12 days ago