Commit ee99cbcd28dec6f966ae154024c2cdf150ad3e9c

Authored by unknown
0 parents

Created a utility to convert any XML file into json format.

.gitignore 0 → 100644
  1 +++ a/.gitignore
  1 +Thumbs.db
  2 +*.obj
  3 +*.exe
  4 +*.pdb
  5 +*.user
  6 +*.aps
  7 +*.pch
  8 +*.vspscc
  9 +*_i.c
  10 +*_p.c
  11 +*.ncb
  12 +*.suo
  13 +*.sln.docstates
  14 +*.tlb
  15 +*.tlh
  16 +*.bak
  17 +*.cache
  18 +*.ilk
  19 +*.log
  20 +[Bb]in
  21 +[Dd]ebug*/
  22 +*.lib
  23 +*.sbr
  24 +obj/
  25 +[Rr]elease*/
  26 +_ReSharper*/
  27 +[Tt]est[Rr]esult*
  28 +*.vssscc
  29 +$tf*/
0 30 \ No newline at end of file
... ...
.tfignore 0 → 100644
  1 +++ a/.tfignore
  1 +\.git
0 2 \ No newline at end of file
... ...
XMLtoJSON_utility.sln 0 → 100644
  1 +++ a/XMLtoJSON_utility.sln
  1 +
  2 +Microsoft Visual Studio Solution File, Format Version 12.00
  3 +# Visual Studio 2013
  4 +VisualStudioVersion = 12.0.21005.1
  5 +MinimumVisualStudioVersion = 10.0.40219.1
  6 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XMLtoJSON_utility", "XMLtoJSON_utility\XMLtoJSON_utility.csproj", "{5BFBC082-1D8E-45D3-B12F-264A7626F245}"
  7 +EndProject
  8 +Global
  9 + GlobalSection(SolutionConfigurationPlatforms) = preSolution
  10 + Debug|Any CPU = Debug|Any CPU
  11 + Release|Any CPU = Release|Any CPU
  12 + EndGlobalSection
  13 + GlobalSection(ProjectConfigurationPlatforms) = postSolution
  14 + {5BFBC082-1D8E-45D3-B12F-264A7626F245}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
  15 + {5BFBC082-1D8E-45D3-B12F-264A7626F245}.Debug|Any CPU.Build.0 = Debug|Any CPU
  16 + {5BFBC082-1D8E-45D3-B12F-264A7626F245}.Release|Any CPU.ActiveCfg = Release|Any CPU
  17 + {5BFBC082-1D8E-45D3-B12F-264A7626F245}.Release|Any CPU.Build.0 = Release|Any CPU
  18 + EndGlobalSection
  19 + GlobalSection(SolutionProperties) = preSolution
  20 + HideSolutionNode = FALSE
  21 + EndGlobalSection
  22 +EndGlobal
... ...
XMLtoJSON_utility/Default.aspx 0 → 100644
  1 +++ a/XMLtoJSON_utility/Default.aspx
  1 +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="XMLtoJSON_utility.Default" ValidateRequest="false"%>
  2 +
  3 +<!DOCTYPE html>
  4 +
  5 +<html xmlns="http://www.w3.org/1999/xhtml">
  6 +<head runat="server">
  7 + <title></title>
  8 +</head>
  9 +<body>
  10 + <form id="form1" runat="server">
  11 + <div>
  12 + <h2>Converting XML to JSON</h2><hr /><br />
  13 + <table style="width: 100%">
  14 + <tr>
  15 + <td> Select File &nbsp;<asp:FileUpload ID="FileUploader" runat="server" /> </td>
  16 + </tr>
  17 + <tr>
  18 + <td><br /><b>Upload XML:</b><br />
  19 + <asp:TextBox ID="txtXml" runat="server" TextMode="MultiLine" Height="300px" Width="500px"></asp:TextBox>
  20 + </td>
  21 + <td><br /><asp:Button ID="UploadButton" runat="server" Text="Upload_ConvertToJson" OnClick="UploadButton_Click" /><br /></td>
  22 + <td><br /><b>JSON:</b><br />
  23 + <asp:TextBox ID="txtJson" runat="server" TextMode="MultiLine" Height="300px" Width="500px"></asp:TextBox>
  24 + </td>
  25 + </tr>
  26 + </table>
  27 +
  28 + <br />
  29 + <asp:Label ID="Label1" runat="server"></asp:Label><br />
  30 + <br />
  31 +
  32 + <br />
  33 + <br />
  34 +
  35 + <br />
  36 +
  37 + </div>
  38 + </form>
  39 +</body>
  40 +</html>
... ...
XMLtoJSON_utility/Default.aspx.cs 0 → 100644
  1 +++ a/XMLtoJSON_utility/Default.aspx.cs
  1 +using System;
  2 +using System.Collections;
  3 +using System.Collections.Generic;
  4 +using System.IO;
  5 +using System.Linq;
  6 +using System.Text;
  7 +using System.Web;
  8 +using System.Web.Script.Serialization;
  9 +using System.Web.UI;
  10 +using System.Web.UI.WebControls;
  11 +using System.Windows.Forms;
  12 +using System.Xml;
  13 +using System.Xml.Linq;
  14 +
  15 +namespace XMLtoJSON_utility
  16 +{
  17 + public partial class Default : System.Web.UI.Page
  18 + {
  19 + protected void Page_Load(object sender, EventArgs e)
  20 + {
  21 +
  22 + }
  23 +
  24 + public string DefaultFileName = "Upload/";
  25 + protected void UploadButton_Click(object sender, EventArgs e)
  26 + {
  27 + txtJson.Text = "";
  28 + txtXml.Text = "";
  29 + Label1.Text="";
  30 + XmlDocument doc = new XmlDocument();
  31 +
  32 + if (FileUploader.HasFile)
  33 + try
  34 + {
  35 + FileUploader.SaveAs(Server.MapPath(DefaultFileName) +
  36 + FileUploader.FileName);
  37 + string path = Server.MapPath("~/Upload/" + FileUploader.PostedFile.FileName);
  38 + doc.Load(path);
  39 + txtXml.Text = doc.InnerXml;
  40 + string JSON = XmlToJSON(doc);
  41 + txtJson.Text = JSON;
  42 + }
  43 + catch (Exception ex)
  44 + {
  45 + Label1.Text = "ERROR: " + ex.Message.ToString();
  46 + }
  47 + else
  48 + {
  49 + Label1.Text = "You have not specified a file.";
  50 + }
  51 +
  52 + }
  53 +
  54 + private static string XmlToJSON(XmlDocument xmlDoc)
  55 + {
  56 + StringBuilder sbJSON = new StringBuilder();
  57 + sbJSON.Append("{ ");
  58 + XmlToJSONnode(sbJSON, xmlDoc.DocumentElement, true);
  59 + sbJSON.Append("}");
  60 + return sbJSON.ToString();
  61 + }
  62 +
  63 + private static void XmlToJSONnode(StringBuilder sbJSON, XmlElement node, bool showNodeName)
  64 + {
  65 + if (showNodeName)
  66 + sbJSON.Append("\"" + SafeJSON(node.Name) + "\": ");
  67 + sbJSON.Append("{");
  68 +
  69 + Dictionary<string, ArrayList> childNodeNames = new Dictionary<string, ArrayList>();
  70 + string attrName;
  71 +
  72 + // Add in all nodes
  73 + foreach (XmlNode cnode in node.ChildNodes)
  74 + {
  75 + if (cnode is XmlText)
  76 + StoreChildNode(childNodeNames, "value", cnode.InnerText);
  77 + else if (cnode is XmlElement)
  78 + StoreChildNode(childNodeNames, cnode.Name, cnode);
  79 + }
  80 + // Add in all node attributes
  81 + if (node.Attributes != null)
  82 + foreach (XmlAttribute attr in node.Attributes)
  83 + {
  84 + attrName = "_" + attr.Name;
  85 + StoreChildNode(childNodeNames, attrName, attr.InnerText);
  86 + }
  87 + // Now output all stored info
  88 + foreach (string childname in childNodeNames.Keys)
  89 + {
  90 + ArrayList alChild = (ArrayList)childNodeNames[childname];
  91 + if (alChild.Count == 1)
  92 + OutputNode(childname, alChild[0], sbJSON, true);
  93 + else
  94 + {
  95 + sbJSON.Append(" \"" + SafeJSON(childname) + "\": [ ");
  96 + foreach (object Child in alChild)
  97 + OutputNode(childname, Child, sbJSON, false);
  98 + sbJSON.Remove(sbJSON.Length - 2, 2);
  99 + sbJSON.Append(" ], ");
  100 + }
  101 + }
  102 + sbJSON.Remove(sbJSON.Length - 2, 2);
  103 + sbJSON.Append(" }");
  104 + }
  105 + // StoreChildNode: Store data associated with each nodeName
  106 + // so that we know whether the nodeName is an array or not.
  107 + private static void StoreChildNode(Dictionary<string, ArrayList> childNodeNames, string nodeName, object nodeValue)
  108 + {
  109 + if (nodeValue is XmlElement)
  110 + {
  111 + XmlNode cnode = (XmlNode)nodeValue;
  112 + if (cnode.Attributes.Count == 0)
  113 + {
  114 + XmlNodeList children = cnode.ChildNodes;
  115 + if (children.Count == 0)
  116 + nodeValue = null;
  117 + else if (children.Count == 1 && (children[0] is XmlText))
  118 + nodeValue = ((XmlText)(children[0])).InnerText;
  119 + }
  120 + }
  121 +
  122 + // object oValuesAL = childNodeNames[nodeName];
  123 + ArrayList ValuesAL;
  124 + if (!childNodeNames.ContainsKey(nodeName))
  125 + {
  126 + ValuesAL = new ArrayList();
  127 + childNodeNames[nodeName] = ValuesAL;
  128 + }
  129 + else
  130 + ValuesAL = childNodeNames[nodeName];
  131 + ValuesAL.Add(nodeValue);
  132 + }
  133 +
  134 + private static void OutputNode(string childname, object alChild, StringBuilder sbJSON, bool showNodeName)
  135 + {
  136 + if (alChild == null)
  137 + {
  138 + if (showNodeName)
  139 + sbJSON.Append("\"" + SafeJSON(childname) + "\": ");
  140 + sbJSON.Append("null");
  141 + }
  142 + else if (alChild is string)
  143 + {
  144 + if (showNodeName)
  145 + sbJSON.Append("\"" + SafeJSON(childname) + "\": ");
  146 + string sChild = (string)alChild;
  147 + sChild = sChild.Trim();
  148 + sbJSON.Append("\"" + SafeJSON(sChild) + "\"");
  149 + }
  150 + else
  151 + XmlToJSONnode(sbJSON, (XmlElement)alChild, showNodeName);
  152 + sbJSON.Append(", ");
  153 + }
  154 +
  155 + // Make a string safe for JSON
  156 + private static string SafeJSON(string sIn)
  157 + {
  158 + StringBuilder sbOut = new StringBuilder(sIn.Length);
  159 + foreach (char ch in sIn)
  160 + {
  161 + if (Char.IsControl(ch) || ch == '\'')
  162 + {
  163 + int ich = (int)ch;
  164 + sbOut.Append(@"\u" + ich.ToString("x4"));
  165 + continue;
  166 + }
  167 + else if (ch == '\"' || ch == '\\' || ch == '/')
  168 + {
  169 + sbOut.Append('\\');
  170 + }
  171 + sbOut.Append(ch);
  172 + }
  173 + return sbOut.ToString();
  174 + }
  175 + }
  176 +}
0 177 \ No newline at end of file
... ...
XMLtoJSON_utility/Default.aspx.designer.cs 0 → 100644
  1 +++ a/XMLtoJSON_utility/Default.aspx.designer.cs
  1 +//------------------------------------------------------------------------------
  2 +// <auto-generated>
  3 +// This code was generated by a tool.
  4 +//
  5 +// Changes to this file may cause incorrect behavior and will be lost if
  6 +// the code is regenerated.
  7 +// </auto-generated>
  8 +//------------------------------------------------------------------------------
  9 +
  10 +namespace XMLtoJSON_utility {
  11 +
  12 +
  13 + public partial class Default {
  14 +
  15 + /// <summary>
  16 + /// form1 control.
  17 + /// </summary>
  18 + /// <remarks>
  19 + /// Auto-generated field.
  20 + /// To modify move field declaration from designer file to code-behind file.
  21 + /// </remarks>
  22 + protected global::System.Web.UI.HtmlControls.HtmlForm form1;
  23 +
  24 + /// <summary>
  25 + /// FileUploader control.
  26 + /// </summary>
  27 + /// <remarks>
  28 + /// Auto-generated field.
  29 + /// To modify move field declaration from designer file to code-behind file.
  30 + /// </remarks>
  31 + protected global::System.Web.UI.WebControls.FileUpload FileUploader;
  32 +
  33 + /// <summary>
  34 + /// txtXml control.
  35 + /// </summary>
  36 + /// <remarks>
  37 + /// Auto-generated field.
  38 + /// To modify move field declaration from designer file to code-behind file.
  39 + /// </remarks>
  40 + protected global::System.Web.UI.WebControls.TextBox txtXml;
  41 +
  42 + /// <summary>
  43 + /// UploadButton control.
  44 + /// </summary>
  45 + /// <remarks>
  46 + /// Auto-generated field.
  47 + /// To modify move field declaration from designer file to code-behind file.
  48 + /// </remarks>
  49 + protected global::System.Web.UI.WebControls.Button UploadButton;
  50 +
  51 + /// <summary>
  52 + /// txtJson control.
  53 + /// </summary>
  54 + /// <remarks>
  55 + /// Auto-generated field.
  56 + /// To modify move field declaration from designer file to code-behind file.
  57 + /// </remarks>
  58 + protected global::System.Web.UI.WebControls.TextBox txtJson;
  59 +
  60 + /// <summary>
  61 + /// Label1 control.
  62 + /// </summary>
  63 + /// <remarks>
  64 + /// Auto-generated field.
  65 + /// To modify move field declaration from designer file to code-behind file.
  66 + /// </remarks>
  67 + protected global::System.Web.UI.WebControls.Label Label1;
  68 + }
  69 +}
... ...
XMLtoJSON_utility/Properties/AssemblyInfo.cs 0 → 100644
  1 +++ a/XMLtoJSON_utility/Properties/AssemblyInfo.cs
  1 +using System.Reflection;
  2 +using System.Runtime.CompilerServices;
  3 +using System.Runtime.InteropServices;
  4 +
  5 +// General Information about an assembly is controlled through the following
  6 +// set of attributes. Change these attribute values to modify the information
  7 +// associated with an assembly.
  8 +[assembly: AssemblyTitle("XMLtoJSON_utility")]
  9 +[assembly: AssemblyDescription("")]
  10 +[assembly: AssemblyConfiguration("")]
  11 +[assembly: AssemblyCompany("")]
  12 +[assembly: AssemblyProduct("XMLtoJSON_utility")]
  13 +[assembly: AssemblyCopyright("Copyright © 2016")]
  14 +[assembly: AssemblyTrademark("")]
  15 +[assembly: AssemblyCulture("")]
  16 +
  17 +// Setting ComVisible to false makes the types in this assembly not visible
  18 +// to COM components. If you need to access a type in this assembly from
  19 +// COM, set the ComVisible attribute to true on that type.
  20 +[assembly: ComVisible(false)]
  21 +
  22 +// The following GUID is for the ID of the typelib if this project is exposed to COM
  23 +[assembly: Guid("93f41f32-37a7-4083-8a3e-83fa608ba870")]
  24 +
  25 +// Version information for an assembly consists of the following four values:
  26 +//
  27 +// Major Version
  28 +// Minor Version
  29 +// Build Number
  30 +// Revision
  31 +//
  32 +// You can specify all the values or you can default the Revision and Build Numbers
  33 +// by using the '*' as shown below:
  34 +[assembly: AssemblyVersion("1.0.0.0")]
  35 +[assembly: AssemblyFileVersion("1.0.0.0")]
... ...
XMLtoJSON_utility/Upload/da_dat_bgart.xml 0 → 100644
  1 +++ a/XMLtoJSON_utility/Upload/da_dat_bgart.xml
  1 +<?xml version="1.0" encoding="utf-8" ?>
  2 +<response id="BackgroundArt">
  3 +<it Id="1" voId="5" brId="2" isfr="N" zm="100" isbt="N" sktn="A" gr="F" lns="0" lne="500" ox="0" oy="0" imId="501.png" />
  4 +<it Id="3" voId="5" brId="2" isfr="N" zm="100" isbt="N" sktn="A" gr="M" lns="0" lne="500" ox="0" oy="0" imId="525.png" />
  5 +<it Id="5" voId="5" brId="3" isfr="N" zm="100" isbt="N" sktn="A" gr="+" lns="0" lne="500" ox="0" oy="0" imId="509.png" />
  6 +<it Id="7" voId="5" brId="4" isfr="N" zm="100" isbt="N" sktn="A" gr="+" lns="0" lne="500" ox="0" oy="0" imId="517.png" />
  7 +<it Id="9" voId="5" brId="2" isfr="N" zm="100" isbt="N" sktn="B" gr="M" lns="0" lne="500" ox="0" oy="0" imId="527.png" />
  8 +<it Id="11" voId="5" brId="2" isfr="N" zm="100" isbt="N" sktn="B" gr="F" lns="0" lne="500" ox="0" oy="0" imId="503.png" />
  9 +<it Id="13" voId="5" brId="3" isfr="N" zm="100" isbt="N" sktn="B" gr="+" lns="0" lne="500" ox="0" oy="0" imId="511.png" />
  10 +<it Id="15" voId="5" brId="4" isfr="N" zm="100" isbt="N" sktn="B" gr="+" lns="0" lne="500" ox="0" oy="0" imId="519.png" />
  11 +<it Id="17" voId="5" brId="2" isfr="N" zm="100" isbt="N" sktn="L" gr="M" lns="0" lne="500" ox="0" oy="0" imId="530.png" />
  12 +<it Id="19" voId="5" brId="2" isfr="N" zm="100" isbt="N" sktn="L" gr="F" lns="0" lne="500" ox="0" oy="0" imId="506.png" />
  13 +<it Id="21" voId="5" brId="3" isfr="N" zm="100" isbt="N" sktn="L" gr="+" lns="0" lne="500" ox="0" oy="0" imId="514.png" />
  14 +<it Id="23" voId="5" brId="4" isfr="N" zm="100" isbt="N" sktn="L" gr="+" lns="0" lne="500" ox="0" oy="0" imId="522.png" />
  15 +<it Id="26" voId="5" brId="2" isfr="N" zm="100" isbt="N" sktn="W" gr="M" lns="0" lne="500" ox="0" oy="0" imId="524.png" />
  16 +<it Id="28" voId="5" brId="2" isfr="N" zm="100" isbt="N" sktn="W" gr="F" lns="0" lne="500" ox="0" oy="0" imId="500.png" />
  17 +<it Id="30" voId="5" brId="3" isfr="N" zm="100" isbt="N" sktn="W" gr="+" lns="0" lne="500" ox="0" oy="0" imId="508.png" />
  18 +<it Id="32" voId="5" brId="4" isfr="N" zm="100" isbt="N" sktn="W" gr="+" lns="0" lne="500" ox="0" oy="0" imId="516.png" />
  19 +<it Id="34" voId="1" brId="2" isfr="Y" zm="100" isbt="N" sktn="+" gr="F" lns="0" lne="8" ox="2" oy="284" imId="6686.png" />
  20 +<it Id="35" voId="1" brId="3" isfr="Y" zm="100" isbt="N" sktn="+" gr="F" lns="0" lne="13" ox="304" oy="380" imId="6687F.png" />
  21 +<it Id="36" voId="3" brId="2" isfr="Y" zm="100" isbt="N" sktn="+" gr="F" lns="0" lne="2" ox="-34" oy="312" imId="6688.png" />
  22 +<it Id="37" voId="2" brId="2" isfr="Y" zm="100" isbt="N" sktn="+" gr="F" lns="0" lne="3" ox="452" oy="246" imId="6689.png" />
  23 +<it Id="38" voId="1" brId="3" isfr="Y" zm="100" isbt="N" sktn="+" gr="M" lns="0" lne="25" ox="310" oy="464" imId="6687.png" />
  24 +<it Id="39" voId="5" brId="2" isfr="Y" zm="100" isbt="N" sktn="+" gr="F" lns="0" lne="500" ox="452" oy="246" imId="6689.png" />
  25 +</response>
0 26 \ No newline at end of file
... ...
XMLtoJSON_utility/Upload/da_dat_brview.xml 0 → 100644
  1 +++ a/XMLtoJSON_utility/Upload/da_dat_brview.xml
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<BodyRegionViews id="BodyRegionViewList">
  3 + <BodyRegionCordinates id="1" ViewOrientationId="1" BodyRegionId="1" Zoom="100" X="1284" Y="44" Width="464" Height="676" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  4 + <BodyRegionCordinates id="2" ViewOrientationId="1" BodyRegionId="2" Zoom="100" X="1140" Y="720" Width="756" Height="844" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  5 + <BodyRegionCordinates id="3" ViewOrientationId="1" BodyRegionId="3" Zoom="100" X="1041" Y="1564" Width="948" Height="932" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  6 + <BodyRegionCordinates id="4" ViewOrientationId="1" BodyRegionId="4" Zoom="100" X="921" Y="2496" Width="576" Height="934" HaveMirrorImage="Y" MirrorX="612" IsPrimary="Y" />
  7 + <BodyRegionCordinates id="5" ViewOrientationId="1" BodyRegionId="5" Zoom="100" X="921" Y="3430" Width="576" Height="944" HaveMirrorImage="Y" MirrorX="612" IsPrimary="Y" />
  8 + <BodyRegionCordinates id="6" ViewOrientationId="1" BodyRegionId="6" Zoom="100" X="0" Y="773" Width="1140" Height="1504" HaveMirrorImage="Y" MirrorX="1896" IsPrimary="Y" />
  9 + <BodyRegionCordinates id="7" ViewOrientationId="2" BodyRegionId="1" Zoom="100" X="92" Y="-6" Width="672" Height="724" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  10 + <BodyRegionCordinates id="8" ViewOrientationId="2" BodyRegionId="2" Zoom="100" X="56" Y="718" Width="756" Height="844" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  11 + <BodyRegionCordinates id="9" ViewOrientationId="2" BodyRegionId="3" Zoom="100" X="32" Y="1562" Width="664" Height="932" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  12 + <BodyRegionCordinates id="10" ViewOrientationId="2" BodyRegionId="4" Zoom="100" X="61" Y="2494" Width="576" Height="934" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  13 + <BodyRegionCordinates id="11" ViewOrientationId="2" BodyRegionId="5" Zoom="100" X="61" Y="3428" Width="576" Height="944" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  14 + <BodyRegionCordinates id="12" ViewOrientationId="3" BodyRegionId="1" Zoom="100" X="106" Y="-4" Width="671" Height="721" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  15 + <BodyRegionCordinates id="13" ViewOrientationId="3" BodyRegionId="2" Zoom="100" X="54" Y="717" Width="756" Height="844" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  16 + <BodyRegionCordinates id="14" ViewOrientationId="3" BodyRegionId="3" Zoom="100" X="164" Y="1561" Width="664" Height="932" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  17 + <BodyRegionCordinates id="15" ViewOrientationId="3" BodyRegionId="4" Zoom="100" X="216" Y="2493" Width="576" Height="934" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  18 + <BodyRegionCordinates id="16" ViewOrientationId="3" BodyRegionId="5" Zoom="100" X="216" Y="3427" Width="576" Height="944" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  19 + <BodyRegionCordinates id="17" ViewOrientationId="4" BodyRegionId="1" Zoom="100" X="1256" Y="57" Width="516" Height="660" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  20 + <BodyRegionCordinates id="18" ViewOrientationId="4" BodyRegionId="2" Zoom="100" X="1136" Y="717" Width="756" Height="844" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  21 + <BodyRegionCordinates id="19" ViewOrientationId="4" BodyRegionId="3" Zoom="100" X="1040" Y="1561" Width="948" Height="932" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  22 + <BodyRegionCordinates id="20" ViewOrientationId="4" BodyRegionId="4" Zoom="100" X="1516" Y="2493" Width="576" Height="934" HaveMirrorImage="Y" MirrorX="-582" IsPrimary="Y" />
  23 + <BodyRegionCordinates id="21" ViewOrientationId="4" BodyRegionId="5" Zoom="100" X="1516" Y="3427" Width="576" Height="944" HaveMirrorImage="Y" MirrorX="-582" IsPrimary="Y" />
  24 + <BodyRegionCordinates id="22" ViewOrientationId="4" BodyRegionId="6" Zoom="100" X="1892" Y="772" Width="1136" Height="1504" HaveMirrorImage="Y" MirrorX="-1892" IsPrimary="Y" />
  25 + <BodyRegionCordinates id="25" ViewOrientationId="5" BodyRegionId="2" Zoom="100" X="57" Y="1" Width="756" Height="844" HaveMirrorImage="N" MirrorX="0" IsPrimary="N" />
  26 + <BodyRegionCordinates id="26" ViewOrientationId="5" BodyRegionId="3" Zoom="100" X="33" Y="845" Width="664" Height="932" HaveMirrorImage="N" MirrorX="0" IsPrimary="N" />
  27 + <BodyRegionCordinates id="27" ViewOrientationId="5" BodyRegionId="4" Zoom="100" X="62" Y="1777" Width="576" Height="190" HaveMirrorImage="N" MirrorX="0" IsPrimary="N" />
  28 + <BodyRegionCordinates id="23" ViewOrientationId="5" BodyRegionId="6" Zoom="100" X="108" Y="64" Width="452" Height="1876" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  29 + <BodyRegionCordinates id="24" ViewOrientationId="6" BodyRegionId="6" Zoom="100" X="0" Y="0" Width="452" Height="1876" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  30 +</BodyRegionViews>
0 31 \ No newline at end of file
... ...
XMLtoJSON_utility/Upload/da_dat_contentlist.xml 0 → 100644
  1 +++ a/XMLtoJSON_utility/Upload/da_dat_contentlist.xml
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<!-- FIXME: remove Body Region, Body System, Image Type and View Orientation names from the xml file.
  3 +<!-- to reduce the size of XML following abbreviations are used
  4 + gr- gender it-item, tl-title, ti-thumbnailImage, cp-contentPath, grId-Gender ID wherever applicable -->
  5 +<root>
  6 +<it id="1" icId="3335" tl="Male Anterior" cp="da_img_3335.jpg" ti="da_tni_3335.jpg" vo="Anterior" gr="Male" />
  7 +<it id="2" icId="3336" tl="Male Lateral" cp="da_img_3336.jpg" ti="da_tni_3336.jpg" vo="Lateral" gr="Male" />
  8 +<it id="3" icId="3337" tl="Male Medial" cp="da_img_3337.jpg" ti="da_tni_3337.jpg" vo="Medial" gr="Male" />
  9 +<it id="4" icId="3338" tl="Male Posterior" cp="da_img_3338.jpg" ti="da_tni_3338.jpg" vo="Posterior" gr="Male" />
  10 +<it id="5" icId="3339" tl="Female Anterior" cp="da_img_3339.jpg" ti="da_tni_3339.jpg" vo="Anterior" gr="Female" />
  11 +<it id="6" icId="3340" tl="Female Lateral" cp="da_img_3340.jpg" ti="da_tni_3340.jpg" vo="Lateral" gr="Female" />
  12 +<it id="7" icId="3341" tl="Female Medial" cp="da_img_3341.jpg" ti="da_tni_3341.jpg" vo="Medial" gr="Female" />
  13 +<it id="8" icId="3342" tl="Female Posterior" cp="da_img_3342.jpg" ti="da_tni_3342.jpg" vo="Posterior" gr="Female" />
  14 +<it id="9" icId="3343" tl="Male Lateral Arm" cp="da_img_3343.jpg" ti="da_tni_3343.jpg" vo="Lateral" gr="Male" />
  15 +<it id="10" icId="3344" tl="Male Medial Arm" cp="da_img_3344.jpg" ti="da_tni_3344.jpg" vo="Medial" gr="Male" />
  16 +<it id="515" icId="3345" tl="Female Lateral Arm" cp="da_img_3345.jpg" ti="da_tni_3345.jpg" vo="Lateral" gr="Female" />
  17 +<it id="516" icId="3346" tl="Female Medial Arm" cp="da_img_3346.jpg" ti="da_tni_3346.jpg" vo="Medial" gr="Female" />
  18 +</root>
0 19 \ No newline at end of file
... ...
XMLtoJSON_utility/Web.Debug.config 0 → 100644
  1 +++ a/XMLtoJSON_utility/Web.Debug.config
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +
  3 +<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
  4 +
  5 +<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  6 + <!--
  7 + In the example below, the "SetAttributes" transform will change the value of
  8 + "connectionString" to use "ReleaseSQLServer" only when the "Match" locator
  9 + finds an attribute "name" that has a value of "MyDB".
  10 +
  11 + <connectionStrings>
  12 + <add name="MyDB"
  13 + connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
  14 + xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
  15 + </connectionStrings>
  16 + -->
  17 + <system.web>
  18 + <!--
  19 + In the example below, the "Replace" transform will replace the entire
  20 + <customErrors> section of your web.config file.
  21 + Note that because there is only one customErrors section under the
  22 + <system.web> node, there is no need to use the "xdt:Locator" attribute.
  23 +
  24 + <customErrors defaultRedirect="GenericError.htm"
  25 + mode="RemoteOnly" xdt:Transform="Replace">
  26 + <error statusCode="500" redirect="InternalError.htm"/>
  27 + </customErrors>
  28 + -->
  29 + </system.web>
  30 +</configuration>
0 31 \ No newline at end of file
... ...
XMLtoJSON_utility/Web.Release.config 0 → 100644
  1 +++ a/XMLtoJSON_utility/Web.Release.config
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +
  3 +<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
  4 +
  5 +<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  6 + <!--
  7 + In the example below, the "SetAttributes" transform will change the value of
  8 + "connectionString" to use "ReleaseSQLServer" only when the "Match" locator
  9 + finds an attribute "name" that has a value of "MyDB".
  10 +
  11 + <connectionStrings>
  12 + <add name="MyDB"
  13 + connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
  14 + xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
  15 + </connectionStrings>
  16 + -->
  17 + <system.web>
  18 + <compilation xdt:Transform="RemoveAttributes(debug)" />
  19 + <!--
  20 + In the example below, the "Replace" transform will replace the entire
  21 + <customErrors> section of your web.config file.
  22 + Note that because there is only one customErrors section under the
  23 + <system.web> node, there is no need to use the "xdt:Locator" attribute.
  24 +
  25 + <customErrors defaultRedirect="GenericError.htm"
  26 + mode="RemoteOnly" xdt:Transform="Replace">
  27 + <error statusCode="500" redirect="InternalError.htm"/>
  28 + </customErrors>
  29 + -->
  30 + </system.web>
  31 +</configuration>
0 32 \ No newline at end of file
... ...
XMLtoJSON_utility/Web.config 0 → 100644
  1 +++ a/XMLtoJSON_utility/Web.config
  1 +<?xml version="1.0"?>
  2 +
  3 +<!--
  4 + For more information on how to configure your ASP.NET application, please visit
  5 + http://go.microsoft.com/fwlink/?LinkId=169433
  6 + -->
  7 +
  8 +<configuration>
  9 + <system.web>
  10 + <compilation debug="true" targetFramework="4.5.2" />
  11 + <httpRuntime targetFramework="4.5.2" />
  12 + </system.web>
  13 +
  14 +</configuration>
... ...
XMLtoJSON_utility/XMLtoJSON_utility.csproj 0 → 100644
  1 +++ a/XMLtoJSON_utility/XMLtoJSON_utility.csproj
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3 + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  4 + <PropertyGroup>
  5 + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
  6 + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
  7 + <ProductVersion>
  8 + </ProductVersion>
  9 + <SchemaVersion>2.0</SchemaVersion>
  10 + <ProjectGuid>{5BFBC082-1D8E-45D3-B12F-264A7626F245}</ProjectGuid>
  11 + <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
  12 + <OutputType>Library</OutputType>
  13 + <AppDesignerFolder>Properties</AppDesignerFolder>
  14 + <RootNamespace>XMLtoJSON_utility</RootNamespace>
  15 + <AssemblyName>XMLtoJSON_utility</AssemblyName>
  16 + <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
  17 + <UseIISExpress>true</UseIISExpress>
  18 + <IISExpressSSLPort />
  19 + <IISExpressAnonymousAuthentication />
  20 + <IISExpressWindowsAuthentication />
  21 + <IISExpressUseClassicPipelineMode />
  22 + </PropertyGroup>
  23 + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
  24 + <DebugSymbols>true</DebugSymbols>
  25 + <DebugType>full</DebugType>
  26 + <Optimize>false</Optimize>
  27 + <OutputPath>bin\</OutputPath>
  28 + <DefineConstants>DEBUG;TRACE</DefineConstants>
  29 + <ErrorReport>prompt</ErrorReport>
  30 + <WarningLevel>4</WarningLevel>
  31 + </PropertyGroup>
  32 + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
  33 + <DebugType>pdbonly</DebugType>
  34 + <Optimize>true</Optimize>
  35 + <OutputPath>bin\</OutputPath>
  36 + <DefineConstants>TRACE</DefineConstants>
  37 + <ErrorReport>prompt</ErrorReport>
  38 + <WarningLevel>4</WarningLevel>
  39 + </PropertyGroup>
  40 + <ItemGroup>
  41 + <Reference Include="Microsoft.CSharp" />
  42 + <Reference Include="System.Web.DynamicData" />
  43 + <Reference Include="System.Web.Entity" />
  44 + <Reference Include="System.Web.ApplicationServices" />
  45 + <Reference Include="System.ComponentModel.DataAnnotations" />
  46 + <Reference Include="System" />
  47 + <Reference Include="System.Data" />
  48 + <Reference Include="System.Core" />
  49 + <Reference Include="System.Data.DataSetExtensions" />
  50 + <Reference Include="System.Web.Extensions" />
  51 + <Reference Include="System.Windows.Forms" />
  52 + <Reference Include="System.Xml.Linq" />
  53 + <Reference Include="System.Drawing" />
  54 + <Reference Include="System.Web" />
  55 + <Reference Include="System.Xml" />
  56 + <Reference Include="System.Configuration" />
  57 + <Reference Include="System.Web.Services" />
  58 + <Reference Include="System.EnterpriseServices" />
  59 + </ItemGroup>
  60 + <ItemGroup>
  61 + <Content Include="da_dat_brview.xml" />
  62 + <Content Include="Default.aspx" />
  63 + <Content Include="Web.config" />
  64 + </ItemGroup>
  65 + <ItemGroup>
  66 + <Compile Include="Default.aspx.cs">
  67 + <DependentUpon>Default.aspx</DependentUpon>
  68 + <SubType>ASPXCodeBehind</SubType>
  69 + </Compile>
  70 + <Compile Include="Default.aspx.designer.cs">
  71 + <DependentUpon>Default.aspx</DependentUpon>
  72 + </Compile>
  73 + <Compile Include="Properties\AssemblyInfo.cs" />
  74 + </ItemGroup>
  75 + <ItemGroup>
  76 + <None Include="Web.Debug.config">
  77 + <DependentUpon>Web.config</DependentUpon>
  78 + </None>
  79 + <None Include="Web.Release.config">
  80 + <DependentUpon>Web.config</DependentUpon>
  81 + </None>
  82 + </ItemGroup>
  83 + <ItemGroup>
  84 + <Folder Include="Upload\" />
  85 + </ItemGroup>
  86 + <PropertyGroup>
  87 + <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
  88 + <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
  89 + </PropertyGroup>
  90 + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  91 + <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
  92 + <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
  93 + <ProjectExtensions>
  94 + <VisualStudio>
  95 + <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
  96 + <WebProjectProperties>
  97 + <UseIIS>True</UseIIS>
  98 + <AutoAssignPort>True</AutoAssignPort>
  99 + <DevelopmentServerPort>50537</DevelopmentServerPort>
  100 + <DevelopmentServerVPath>/</DevelopmentServerVPath>
  101 + <IISUrl>http://localhost:50537/</IISUrl>
  102 + <NTLMAuthentication>False</NTLMAuthentication>
  103 + <UseCustomServer>False</UseCustomServer>
  104 + <CustomServerUrl>
  105 + </CustomServerUrl>
  106 + <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
  107 + </WebProjectProperties>
  108 + </FlavorProperties>
  109 + </VisualStudio>
  110 + </ProjectExtensions>
  111 + <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  112 + Other similar extension points exist, see Microsoft.Common.targets.
  113 + <Target Name="BeforeBuild">
  114 + </Target>
  115 + <Target Name="AfterBuild">
  116 + </Target>
  117 + -->
  118 +</Project>
0 119 \ No newline at end of file
... ...
XMLtoJSON_utility/da_dat_brview.xml 0 → 100644
  1 +++ a/XMLtoJSON_utility/da_dat_brview.xml
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<BodyRegionViews id="BodyRegionViewList">
  3 + <BodyRegionCordinates id="1" ViewOrientationId="1" BodyRegionId="1" Zoom="100" X="1284" Y="44" Width="464" Height="676" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  4 + <BodyRegionCordinates id="2" ViewOrientationId="1" BodyRegionId="2" Zoom="100" X="1140" Y="720" Width="756" Height="844" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  5 + <BodyRegionCordinates id="3" ViewOrientationId="1" BodyRegionId="3" Zoom="100" X="1041" Y="1564" Width="948" Height="932" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  6 + <BodyRegionCordinates id="4" ViewOrientationId="1" BodyRegionId="4" Zoom="100" X="921" Y="2496" Width="576" Height="934" HaveMirrorImage="Y" MirrorX="612" IsPrimary="Y" />
  7 + <BodyRegionCordinates id="5" ViewOrientationId="1" BodyRegionId="5" Zoom="100" X="921" Y="3430" Width="576" Height="944" HaveMirrorImage="Y" MirrorX="612" IsPrimary="Y" />
  8 + <BodyRegionCordinates id="6" ViewOrientationId="1" BodyRegionId="6" Zoom="100" X="0" Y="773" Width="1140" Height="1504" HaveMirrorImage="Y" MirrorX="1896" IsPrimary="Y" />
  9 + <BodyRegionCordinates id="7" ViewOrientationId="2" BodyRegionId="1" Zoom="100" X="92" Y="-6" Width="672" Height="724" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  10 + <BodyRegionCordinates id="8" ViewOrientationId="2" BodyRegionId="2" Zoom="100" X="56" Y="718" Width="756" Height="844" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  11 + <BodyRegionCordinates id="9" ViewOrientationId="2" BodyRegionId="3" Zoom="100" X="32" Y="1562" Width="664" Height="932" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  12 + <BodyRegionCordinates id="10" ViewOrientationId="2" BodyRegionId="4" Zoom="100" X="61" Y="2494" Width="576" Height="934" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  13 + <BodyRegionCordinates id="11" ViewOrientationId="2" BodyRegionId="5" Zoom="100" X="61" Y="3428" Width="576" Height="944" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  14 + <BodyRegionCordinates id="12" ViewOrientationId="3" BodyRegionId="1" Zoom="100" X="106" Y="-4" Width="671" Height="721" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  15 + <BodyRegionCordinates id="13" ViewOrientationId="3" BodyRegionId="2" Zoom="100" X="54" Y="717" Width="756" Height="844" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  16 + <BodyRegionCordinates id="14" ViewOrientationId="3" BodyRegionId="3" Zoom="100" X="164" Y="1561" Width="664" Height="932" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  17 + <BodyRegionCordinates id="15" ViewOrientationId="3" BodyRegionId="4" Zoom="100" X="216" Y="2493" Width="576" Height="934" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  18 + <BodyRegionCordinates id="16" ViewOrientationId="3" BodyRegionId="5" Zoom="100" X="216" Y="3427" Width="576" Height="944" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  19 + <BodyRegionCordinates id="17" ViewOrientationId="4" BodyRegionId="1" Zoom="100" X="1256" Y="57" Width="516" Height="660" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  20 + <BodyRegionCordinates id="18" ViewOrientationId="4" BodyRegionId="2" Zoom="100" X="1136" Y="717" Width="756" Height="844" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  21 + <BodyRegionCordinates id="19" ViewOrientationId="4" BodyRegionId="3" Zoom="100" X="1040" Y="1561" Width="948" Height="932" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  22 + <BodyRegionCordinates id="20" ViewOrientationId="4" BodyRegionId="4" Zoom="100" X="1516" Y="2493" Width="576" Height="934" HaveMirrorImage="Y" MirrorX="-582" IsPrimary="Y" />
  23 + <BodyRegionCordinates id="21" ViewOrientationId="4" BodyRegionId="5" Zoom="100" X="1516" Y="3427" Width="576" Height="944" HaveMirrorImage="Y" MirrorX="-582" IsPrimary="Y" />
  24 + <BodyRegionCordinates id="22" ViewOrientationId="4" BodyRegionId="6" Zoom="100" X="1892" Y="772" Width="1136" Height="1504" HaveMirrorImage="Y" MirrorX="-1892" IsPrimary="Y" />
  25 + <BodyRegionCordinates id="25" ViewOrientationId="5" BodyRegionId="2" Zoom="100" X="57" Y="1" Width="756" Height="844" HaveMirrorImage="N" MirrorX="0" IsPrimary="N" />
  26 + <BodyRegionCordinates id="26" ViewOrientationId="5" BodyRegionId="3" Zoom="100" X="33" Y="845" Width="664" Height="932" HaveMirrorImage="N" MirrorX="0" IsPrimary="N" />
  27 + <BodyRegionCordinates id="27" ViewOrientationId="5" BodyRegionId="4" Zoom="100" X="62" Y="1777" Width="576" Height="190" HaveMirrorImage="N" MirrorX="0" IsPrimary="N" />
  28 + <BodyRegionCordinates id="23" ViewOrientationId="5" BodyRegionId="6" Zoom="100" X="108" Y="64" Width="452" Height="1876" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  29 + <BodyRegionCordinates id="24" ViewOrientationId="6" BodyRegionId="6" Zoom="100" X="0" Y="0" Width="452" Height="1876" HaveMirrorImage="N" MirrorX="0" IsPrimary="Y" />
  30 +</BodyRegionViews>
0 31 \ No newline at end of file
... ...