title: XBA parsing and update with Excel VBA
body: <p>I'm trying to make an XML parser/updater through Excel VBA.</p>
  <p>First of all, I have been going back and forth between Excel VBA and Python but it seemed like Excel VBA was a better option to me.
  However, I am open to any method really so please let me know if anyone has a different suggestion that would work better.</p>
  <p>So, what I want to do with this application.</p>
  <ul>
  <li>Parse XML and note the information on Excel format</li>
  <li>I need name and the value of each attributes along with the text value of each node</li>
  <li>After getting the information in the Excel format, I want to be able to revise values and output back to the XML format</li>
  </ul>
  <p>So, in a nutshell, I am really aiming for a XML editor I guess?
  But I am stuck at a few issues from the startline.
  Here's a brief implementation of the XML parsing portion:</p>
  <pre><code>'load xml document
  Set xmlDoc = CreateObject(&quot;MSXML2.DOMDocument.6.0&quot;)
  xmlDoc.async = False
  xmlDoc.validateOnParse = False
  xmlDoc.Load(xmlFilepath)
  
  'get document elements
  Set xmlDocElement = xmlDoc.DocumentElement
  Debug.Print xmlDocElement.xml
  For i = 0 To xmlDocElement.ChildNodes.Length - 1
      Debug.Print xmlDocElement.ChildNodes(i).xml
      For j = 0 To xmlDocElement.ChildNodes(i).Attributes.Length - 1
          Debug.Print xmlDocElement.ChildNodes(i).Attributes.Item(j).Name
          Debug.Print xmlDocElement.ChildNodes(i).Attributes.Item(j).Value
      Next j
      Debug.Print xmlDocElement.ChildNodes(i).Text
  Next i
  </code></pre>
  <p>The above method works well more or less with an exception for two conditions, so far at least.</p>
  <ul>
  <li>XML file cannot be loaded if the text includes &amp;/&gt;/&lt;</li>
  <li>XML file cannot be loaded if it includes more than 1 highest parent node.</li>
  </ul>
  <p>Text including &amp;/&gt;/&lt; sample:</p>
  <pre><code>&lt;parenttag&gt;
      &lt;childtag&gt;I love mac&amp;cheese&lt;/childtag&gt;
  &lt;/parenttag&gt;
  </code></pre>
  <p>The answer I found online was quite conclusive:
  Revise the text so that it does not use &amp;/&gt;/&lt;.
  But I cannot modify the text and need to keep the current format.
  Any way to bypass this?</p>
  <p>More than 1 highest parent node sample:</p>
  <pre><code>&lt;parenttag&gt;
      &lt;childtag&gt;Text&lt;/childtag&gt;
  &lt;/parenttag&gt;
  &lt;differenttag&gt;
      &lt;childtag&gt;Some other text&lt;/childtag&gt;
  &lt;/differenttag&gt;
  </code></pre>
  <p>XML Load does not work with multiple parent tags in 1 XML file.
  And again, I cannot modify the XML file content, so I need a way around the load error.</p>
  <p>I also want to note that I have initially started this project
  by reading XML file as a text and process line by line.
  But, this did not work well with multi-line content
  and thus trying to figure out a way to process XML file properly.</p>
  <p>This question really includes multiple portions but I would really appreciate if I can get any help.</p>