RE: [flexcoders] Re: XML attributes

2008-11-25 Thread Tracy Spratt
Try this: var myName:String = node.attribute("Name"); Or make sure *every* node has the Name attribute, including the root node. The loop works because it skips the root. I just always use attribute() if I am reading, and @ only if I am setting. Tracy Fr

Re: [flexcoders] Re: XML Attributes with a period in their name?

2007-03-20 Thread Claus Wahlers
> Perfect! I thought I tried every syntax trick I could think of, maybe > just forgot to try square brackets. I couldnt find anything in the > documentation about it. It's there, a bit hidden though: http://livedocs.adobe.com/flex/2/langref/operators.html#brackets_(XML) [ ] brackets (XML) operat

Re: [flexcoders] Re: XML Attributes with a period in their name?

2007-03-20 Thread Claus Wahlers
> I CAN get to the attributes by doing the following: > myAtt:XMLList = xmlData.reg.attribute("reg.1.user"); > > but I would really like to use the E4X capabilities to make this > easier. Is there an easy way to set the reg.1.user attribute? var xml:XML = trace([EMAIL PROTECTED]"foo.bar"]); //

Re: [flexcoders] Re: XML Attributes with a period in their name?

2007-03-20 Thread Tom Chiverton
On Tuesday 20 Mar 2007, not_a_coop wrote: > field by a top manufacturer for a number of years already. I'm just > working on an application that needs to be able to read and write > their configuration files. So treat the XML as a plain string. -- Tom Chiverton Helping to preemptively syndicate

Re: [flexcoders] Re: XML Attributes with a period in their name?

2007-03-20 Thread Claus Wahlers
>> Dots are not allowed in attribute names. I'd use underscore or dash. > Where in the XML spec does it state periods are not allowed? Sorry, my mistake. Dots are indeed allowed in attributes. > In any > case, that is completely irrelevant to the problem at hand. The XML > configuration files fo