# Importing and Web Services

**URL:** <https://forum.inductiveautomation.com/t/importing-and-web-services/12011>\
**Category:** General Discussion\
**Created:** [August 8, 2016, 9:25am UTC](https://forum.inductiveautomation.com/t/importing-and-web-services/12011 "2016-08-08T09:25:36Z")\
**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 8, 2016, 9:25am UTC](https://forum.inductiveautomation.com/t/importing-and-web-services/12011/1 "2016-08-08T09:25:36Z")

</div>

Hi Guys,

I’m new to Ignition. I noticed when running the code directly inside the script console. My script is working fine. Below is my sample script:

import xml.etree.cElementTree as ET

#Build the XML and return element for further processing  
InSite = ET.Element(’\_\_InSite’)  
InSite.set(’\_\_encryption’,‘2’)

print str(InSite)

In this sample snippet this works fine. However when I incorporate this code inside the Web Dev Module (WebService) my print str(InSite) is null. I think the import xml.etree.cElementTree as ET is culprit here. Is importing not allowed in Web Dev Module? Any suggestions?

Thanks.

---

<div class="post-metadata">

**Author:** ![ryanjmclaughlin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryanjmclaughlin/32/4318_2.png) [@ryanjmclaughlin](https://forum.inductiveautomation.com/u/ryanjmclaughlin)\
**Post date:** [August 9, 2016, 4:41pm UTC](https://forum.inductiveautomation.com/t/importing-and-web-services/12011/2 "2016-08-09T16:41:05Z")

</div>

Ian, 2 things… you can check the gateway console for any errors related to the WebDev module

Additionally you var you are trying to print is a reference to an ET object, not a string. You should use the ET method to convert before you return it.

```auto
xml = ET.tostring(ET_xml_object)
	
return {'html': xml}
```
