# Bypassed an XML namespace, but what did I do?

**URL:** <https://forum.kirupa.com/t/bypassed-an-xml-namespace-but-what-did-i-do/261756>\
**Category:** flash\
**Created:** [May 30, 2008, 3:17pm UTC](https://forum.kirupa.com/t/bypassed-an-xml-namespace-but-what-did-i-do/261756 "2008-05-30T15:17:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ironchefmoto](https://avatars.discourse-cdn.com/v4/letter/i/91b2a8/32.png) [@ironchefmoto](https://forum.kirupa.com/u/ironchefmoto)\
**Post date:** [May 30, 2008, 3:17pm UTC](https://forum.kirupa.com/t/bypassed-an-xml-namespace-but-what-did-i-do/261756/1 "2008-05-30T15:17:24Z")

</div>

I just started using AS3 for my first project, and I’m pretty sure I’m already in over my head. It’s a widget that pulls in several XML/RSS feeds, one of which is from a weather vendor. Their feed starts:

```auto
<?xml version="1.0" ?>
<adc_database xmlns="http://www.aweathervendor.com">
	<updated>5/30/2008 1:55:00 PM UTC</updated>
	<units>
		<temp>F</temp>
		<dist>Miles</dist>
		<speed>mph</speed>
		<pres>in</pres>
		<prec>in</prec>
	</units>
</adc_database>

```

I had trouble parsing that out, until I manually edited the feed and removed the namespace attribute. Wow – did that ever affect things in AS2? I can’t remember – don’t know enough about 'em.

Thankfully, I found a thread in here that solved the problem, but…

…I don’t know what I did. Can someone explain the syntax in the code that I used to trace/capture the nodes I needed to use?

This didn’t work:

```auto
_oWxData.current_temp = e.target.oXML.currentconditions.temperature;

```

This worked (the namespace compensation):

```auto
_oWxData.current_temp = e.target.oXML.*::currentconditions.temperature;

```

What did I do with E4X in the second part?

Thanks,  
IronChefMorimoto

---

<div class="post-metadata">

**Author:** ![ironchefmoto](https://avatars.discourse-cdn.com/v4/letter/i/91b2a8/32.png) [@ironchefmoto](https://forum.kirupa.com/u/ironchefmoto)\
**Post date:** [May 30, 2008, 3:28pm UTC](https://forum.kirupa.com/t/bypassed-an-xml-namespace-but-what-did-i-do/261756/2 "2008-05-30T15:28:55Z")

</div>

OK – apparently I have to do the namespace fix more the deeper I go:

```auto
_oWxData.current_temp = e.target.oXML.*::currentconditions.*::temperature;

```

Now I’m really confused – any way to avoid having to do this? Other than getting the vendor to remove that namespace attribute from the feed?

IronChefMorimoto

---

<div class="post-metadata">

**Author:** ![ironchefmoto](https://avatars.discourse-cdn.com/v4/letter/i/91b2a8/32.png) [@ironchefmoto](https://forum.kirupa.com/u/ironchefmoto)\
**Post date:** [May 30, 2008, 6:43pm UTC](https://forum.kirupa.com/t/bypassed-an-xml-namespace-but-what-did-i-do/261756/3 "2008-05-30T18:43:53Z")

</div>

Bueller?

IronChefMorimoto

---

<div class="post-metadata">

**Author:** ![senocular](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/senocular/32/7217_2.png) [@senocular](https://forum.kirupa.com/u/senocular)\
**Post date:** [May 30, 2008, 6:52pm UTC](https://forum.kirupa.com/t/bypassed-an-xml-namespace-but-what-did-i-do/261756/4 "2008-05-30T18:52:36Z")

</div>

you should be able to use:  
[http://livedocs.adobe.com/flex/3/langref/statements.html#default\_xml\_namespace](http://livedocs.adobe.com/flex/3/langref/statements.html#default_xml_namespace)
