{"repo":"davidcalhoun/jstoxml","free":true,"listed":false,"github":"https://github.com/davidcalhoun/jstoxml","clone":"git clone https://github.com/davidcalhoun/jstoxml.git","description":"JavaScript object to XML converter (useful for RSS, podcasts, GPX, AMP, etc)","language":"JavaScript","stars":189,"topics":["xml","rss","podcast","amp","html","amp-html","jsx","jsx-syntax","gpx"],"license":"MIT","category":"productivity","readme_excerpt":"jstoxml Convert JavaScript objects (and JSON) to XML (for RSS, Podcasts, etc.) Everyone loves JSON, and more and more folks want to move that direction, but we still need things outputted in XML! Particularly for RSS feeds and Podcasts. This is inspired by node-jsontoxml, which was found to be a bit too rough around the edges. jstoxml attempts to fix that by being more flexible. Requirements Node 16+ or a code bundler that understands ES Modules. Installation - npm install jstoxml Simple example Configuration object options (passed as second parameter to toXML() ) Key name Type Default Description --------------------- ------------------- ------------------------------------------------------------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- indent string Indent string, repeated n times (where n=tree depth). header string , boolean Outputs a simple XML 1.0 UTF-8 header when true. Can also be set to a custom string. attributeReplacements object { \" \": \"&gt;\", \"&\": \"&amp;\", \"\\\"\": \"&quot;\" } XML attribute value substrings to replace (e.g. ). Does not double encode HTML entities (e.g. &lt; is preserved and NOT converted to &amp;lt ). attributeFilter function Filters out attributes based on user-supplied function. attributeExplicitTrue boolean false When true explicitly outputs true attribute value strings, e.g. instead of . contentMap functio","default_branch":null,"files":null,"tree":[],"storefront":"/r/davidcalhoun","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/davidcalhoun/jstoxml/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}