question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some Browsers Don't Properly Import XML with Sub-Block Nodes

See original GitHub issue

Problem statement

If the XML parser tries to deserialize some xml that has nodes inside block tags (i.e. shadow blocks, values, etc) it will sometimes fail, depending on the browser.

This can be seen when opening certain toolbox categories, as well as when importing straight XML through the playground.

Steps to Reproduce

  1. Try to import the below code in the playground.
<xml xmlns="http://www.w3.org/1999/xhtml">
  <block type="controls_if" id="L:ym~c^IZzI,G#/PaR(^" x="38" y="88">
    <value name="IF0">
      <block type="logic_boolean" id="JQdsdXtYxW}j~W8k%ke`">
        <field name="BOOL">TRUE</field>
      </block>
    </value>
  </block>
</xml>
  1. Observe the error.

Stack Traces

0: Object doesn't support property or method 'getAttribute'
xml.js (630,6)

Operating System and Browser

  • Windows Internet Explorer 11
  • Windows Edge

Additional Information

I think the problem originates with #2468 If you try and log the value of Element.TEXT_NODE inside of the domToBlockHeadless_ function when you’re running on internet explorer or edge, it will return undefined. If you log it when on chrome or firefox it returns 3 (correct).

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
NeilFrasercommented, May 26, 2019

Good grief. Thanks for this.

Can you check to see if Microsoft browsers know about Node.TEXT_NODE?

0reactions
RoboErikGcommented, May 29, 2019

#2503 has been merged.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Import XML data - Microsoft Support
If you want to import multiple XML files into multiple sets of mapped cells, click a cell anywhere on the worksheet that isn't...
Read more >
IMPORTING XML FILES WITH MANY NODES
Hi, everyone. I have an XML file with several distinct nodes which I am not able to import using the tool "Input Data"....
Read more >
Why my browsers display XML files as blank pages?
If the XML file is valid then most browsers (IE8, Chrome and Firefox) give a message like This XML file does not appear...
Read more >
Parsing an XML File Using SAX - Oracle Help Center
This JAXP Java tutorial describes Java API for XML Processing (jaxp), XSLT, SAX, and related XML topics.
Read more >
Importing XML data into Microsoft Excel
This document explains how to take XML data and load that data into Microsoft Excel. These instructions were created using Internet Explorer 7.0...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found