🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

simple-xml2json

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-xml2json - npm Package Compare versions

Comparing version
1.2.0
to
1.2.1
.ntvs_analysis.dat

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

+2
D:\GIT\xml2json\obj\Debug\xml2json.njsprojResolveAssemblyReference.cache
D:\GIT\xml2json\bin\Microsoft.NodejsTools.WebRole.dll

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2013 for Web
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "xml2json", "xml2json.njsproj", "{B80DD778-D9DD-47F1-A25F-D46696E11341}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B80DD778-D9DD-47F1-A25F-D46696E11341}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B80DD778-D9DD-47F1-A25F-D46696E11341}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B80DD778-D9DD-47F1-A25F-D46696E11341}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B80DD778-D9DD-47F1-A25F-D46696E11341}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Sorry, the diff of this file is not supported yet

+1
-1

@@ -63,3 +63,3 @@ /*

var preeval="";
var niva=y[i].split("<")[0];
var niva=parseInt(y[i].split("<")[0], 10);
var tagnamn=y[i].split("<")[1].split(">")[0];

@@ -66,0 +66,0 @@ tagnamn=tagnamn.toLowerCase();

{
"name": "simple-xml2json",
"version": "1.2.0",
"version": "1.2.1",
"description": "xml to json for Node.js",

@@ -5,0 +5,0 @@ "author": "Mayank Dedhia <mayankdedhia@gmail.com>",

var xml2json = require("../lib/xml2json"),
xml = "<xml><category><id>1</id><name>Programmer</name><url>http://www.k-zone.cn/zblog/catalog.asp?cate=1</url><intro></intro><order>1</order><count>3</count></category><category><id>5</id><name>Others</name><url>http://www.k-zone.cn/zblog/catalog.asp?cate=5</url><intro></intro><order>5</order><count>62</count></category><category><id>6</id><name>Diarys</name><url>http://www.k-zone.cn/zblog/catalog.asp?cate=6</url><intro></intro><order>4</order><count>32</count></category><category><id>7</id><name>Messag</name><url>http://www.k-zone.cn/zblog/catalog.asp?cate=7</url><intro></intro><order>0</order><count>11</count></category><category><id>8</id><name>Product</name><url>http://www.k-zone.cn/zblog/catalog.asp?cate=8</url><intro></intro><order>3</order><count>7</count></category><category><id>9</id><name>Web Design</name><url>http://www.k-zone.cn/zblog/catalog.asp?cate=9</url><intro></intro><order>2</order><count>1</count></category><category><id>10</id><name>Product-Flex</name><url>http://www.k-zone.cn/zblog/catalog.asp?cate=10</url><intro></intro><order>6</order><count>129</count></category><category><id>11</id><name>Apollo</name><url>http://www.k-zone.cn/zblog/catalog.asp?cate=11</url><intro></intro><order>7</order><count>8</count></category><category><id>12</id><name>ZBLOG修改</name><url>http://www.k-zone.cn/zblog/catalog.asp?cate=12</url><intro></intro><order>8</order><count>20</count></category><category><id>14</id><name>培训与招聘</name><url>http://www.k-zone.cn/zblog/catalog.asp?cate=14</url><intro></intro><order>9</order><count>21</count></category><category><id>15</id><name>产品介绍</name><url>http://www.k-zone.cn/zblog/catalog.asp?cate=15</url><intro></intro><order>10</order><count>9</count></category><category><id>16</id><name>闲言碎语</name><url>http://www.k-zone.cn/zblog/catalog.asp?cate=16</url><intro></intro><order>11</order><count>4</count></category></xml>";
xml = '<blah><b><a><widget id="content-container"><widget id="activity-body"><widget id="question-text" /><widget id="graph-container"><widget id="equation-graph"/><widget id="graph-controls"><widget id="slope-slider-1"/><widget id="constant-slider-1"/><widget id="initial-amount-slider-1"/><widget id="decay-rate-slider-1"/></widget></widget><widget id="message" /><widget id="next-button" /></widget></widget></a></b></blah>';
json = xml2json.parser( xml );
console.log( json.xml.category[0].url );
console.log(JSON.stringify(json, null, 4));