# Web Dev Module and ElementTree

**URL:** <https://forum.inductiveautomation.com/t/web-dev-module-and-elementtree/12026>\
**Category:** General Discussion\
**Created:** [August 11, 2016, 7:41am UTC](https://forum.inductiveautomation.com/t/web-dev-module-and-elementtree/12026 "2016-08-11T07:41:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wmorata](https://avatars.discourse-cdn.com/v4/letter/w/e9a140/32.png) [@wmorata](https://forum.inductiveautomation.com/u/wmorata)\
**Post date:** [August 11, 2016, 7:41am UTC](https://forum.inductiveautomation.com/t/web-dev-module-and-elementtree/12026/1 "2016-08-11T07:41:01Z")

</div>

Hi All,

I’ve been working on a Web Dev module using this sample code:

import xml.etree.ElementTree as ET  
#lets assume this is the xml  
xml = ‘\<?xml version="1.0"?\>1’  
root = ET.fromstring(xml)

when the program reach line:  
root = ET.fromstring(xml)  
I will get an HTTP 500 error

But when executing this via script console everything works fine. I don’t know if I’m missing something.

Any thoughts on this?

Thanks 😃

---

<div class="post-metadata">

**Author:** ![wmorata](https://avatars.discourse-cdn.com/v4/letter/w/e9a140/32.png) [@wmorata](https://forum.inductiveautomation.com/u/wmorata)\
**Post date:** [August 12, 2016, 4:45am UTC](https://forum.inductiveautomation.com/t/web-dev-module-and-elementtree/12026/2 "2016-08-12T04:45:32Z")

</div>

I find a work around, instead of using ElementTree I used xml.dom.minidom in handling xml

All is working fine in both Script console and Web Dev Module. 😃
