<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How do you convert xml to json (ideally without dependencies)]]></title><description><![CDATA[<p dir="auto">I use xml2json.js to convert xml to json in my <code>module.js</code>.<br />
For the further development of my module (<a href="https://github.com/Ax-LED/MMM-Dreambox" target="_blank" rel="noopener noreferrer nofollow ugc">MMM-Dreambox</a>) I have to convert xml to json in <code>node_helper.js</code>.<br />
How can i do this (ideally without dependencies)<br />
I have not found any way to use xml2json.js in <code>node_helper.js</code> so far.</p>
<p dir="auto">Looking forward to your replies.</p>
<p dir="auto">AxLED</p>
]]></description><link>https://forum.magicmirror.builders/topic/9824/how-do-you-convert-xml-to-json-ideally-without-dependencies</link><generator>RSS for Node</generator><lastBuildDate>Sat, 06 Jun 2026 13:17:19 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/9824.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 18 Feb 2019 11:26:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How do you convert xml to json (ideally without dependencies) on Mon, 18 Feb 2019 20:57:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a><br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/cowboysdude" aria-label="Profile: cowboysdude">@<bdi>cowboysdude</bdi></a><br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/lavolp3" aria-label="Profile: lavolp3">@<bdi>lavolp3</bdi></a></p>
<p dir="auto">Thanks for your posts, i got some further.</p>
<ol>
<li>i added following line in my node_helper.js</li>
</ol>
<pre><code>const parser = require("./MMM-Dreambox-xml2json.js");
</code></pre>
<p dir="auto">So node_helper.js checks for MMM-Dreambox-xml2json.js within the same directory.<br />
After this, i can use a function of <code>MMM-Dreambox-xml2json.js</code> inside of node_helper.js by calling <code>parser.functionname()</code> in my case <code>parser.xml2json()</code>.</p>
<p dir="auto">AxLED</p>
]]></description><link>https://forum.magicmirror.builders/post/52696</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/52696</guid><dc:creator><![CDATA[AxLed]]></dc:creator><pubDate>Mon, 18 Feb 2019 20:57:54 GMT</pubDate></item><item><title><![CDATA[Reply to How do you convert xml to json (ideally without dependencies) on Mon, 18 Feb 2019 14:20:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cowboysdude" aria-label="Profile: cowboysdude">@<bdi>cowboysdude</bdi></a> well you’re right in the aspect that one dependency of your rfacts module messed up the whole module for me.<br />
Luckily it’s shining bright on my mirror now. And the facts are really good.<br />
Now back to OT…</p>
]]></description><link>https://forum.magicmirror.builders/post/52646</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/52646</guid><dc:creator><![CDATA[lavolp3]]></dc:creator><pubDate>Mon, 18 Feb 2019 14:20:43 GMT</pubDate></item><item><title><![CDATA[Reply to How do you convert xml to json (ideally without dependencies) on Mon, 18 Feb 2019 13:53:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lavolp3" aria-label="Profile: lavolp3">@<bdi>lavolp3</bdi></a> Well I use the principle that less moving parts tends to make things easier… :)</p>
]]></description><link>https://forum.magicmirror.builders/post/52645</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/52645</guid><dc:creator><![CDATA[cowboysdude]]></dc:creator><pubDate>Mon, 18 Feb 2019 13:53:07 GMT</pubDate></item><item><title><![CDATA[Reply to How do you convert xml to json (ideally without dependencies) on Mon, 18 Feb 2019 12:52:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cowboysdude" aria-label="Profile: cowboysdude">@<bdi>cowboysdude</bdi></a> Do we? Didn’t know about that. Why? Because it’s getting too complex?</p>
]]></description><link>https://forum.magicmirror.builders/post/52641</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/52641</guid><dc:creator><![CDATA[lavolp3]]></dc:creator><pubDate>Mon, 18 Feb 2019 12:52:31 GMT</pubDate></item><item><title><![CDATA[Reply to How do you convert xml to json (ideally without dependencies) on Mon, 18 Feb 2019 12:38:00 GMT]]></title><description><![CDATA[<p dir="auto">xml2js is the only way I know to do it.   I know we try to not use dependencies but sometimes it can’t be helped.</p>
]]></description><link>https://forum.magicmirror.builders/post/52639</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/52639</guid><dc:creator><![CDATA[cowboysdude]]></dc:creator><pubDate>Mon, 18 Feb 2019 12:38:00 GMT</pubDate></item><item><title><![CDATA[Reply to How do you convert xml to json (ideally without dependencies) on Mon, 18 Feb 2019 12:35:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/axled" aria-label="Profile: axled">@<bdi>axled</bdi></a> var xxx = require(‘xml2json’)</p>
<p dir="auto">if u need something other than code YOU write, that is a dependency</p>
<p dir="auto">create a package.json in your module folder and add those other things to the list to get installed after your module, with npm install</p>
]]></description><link>https://forum.magicmirror.builders/post/52637</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/52637</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Mon, 18 Feb 2019 12:35:19 GMT</pubDate></item></channel></rss>