title: How can i parse xml file type of svg?
body: <pre><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  using System.Xml;
  
  public class XmlReader : MonoBehaviour
  {
      XmlDocument doc = new XmlDocument();
  
      // Use this for initialization
      void Start ()
      {
          doc.Load(@"C:\Users\myxml\Documents\mysvg.svg");
          XmlNode node = doc.DocumentElement.SelectSingleNode("/g");
  
          foreach (XmlNode nodes in doc.DocumentElement.ChildNodes)
          {
              string text = nodes.InnerText; //or loop through its children as well
          }
      }
  
      // Update is called once per frame
      void Update ()
      {
  
      }
  }
  </code></pre>
  
  <p>I want to get all the children under <code>&lt;g&gt;</code></p>
  
  <p>Then to parse each child to array for example:</p>
  
  <pre><code>&lt;g
       inkscape:label="Layer 1"
       inkscape:groupmode="layer"
       id="layer1"&gt;
      &lt;rect
         style="opacity:1;fill:#00c8fc;fill-opacity:0.98823529;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
         id="rect4155"
         width="45.714287"
         height="30"
         x="37.387959"
         y="115.30345" /&gt;
      &lt;rect
         style="opacity:1;fill:#00c8fc;fill-opacity:0.98823529;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
         id="rect4155-5"
         width="45.714287"
         height="30"
         x="91.899246"
         y="115.40621" /&gt;
  </code></pre>
  
  <p>So i want to create array call it <code>Rects</code>
  Maybe <code>string[] Rects;</code></p>
  
  <p>Then under each Rect in the array to have his parameters also as strings:</p>
  
  <pre><code>Rect1
   fill:#00c8fc
   width="45.714287"
   height="30"
   x="37.387959"
   y="115.30345"
  </code></pre>
  
  <p>This format.</p>
  
  <p>So then i can get access from another script to Rect1 and his parameters like:
  <code>Rect1.width</code>... or <code>Rect1.x</code>....<code>Rect1.fill</code>....</p>