[flexcoders] XML Entity won't parse inside MXML

2009-03-16 Thread markdemich
I have some embbeded XML inside an MXML file that I'm feeding to an outline.  
Some of my attributes need to have a quote character. It looks something like 
this

mx:XMLList id=testXml
sample badattribute=quot;ABCquot;
test name=1/
test name=2/
/sample
mx:XMLList

This refuses to compile.

I even ran a test where I omitted, the badattribute from the xml and then in 
the code I did something like this,

testx...@test = 'ABC';
trace(textXml.toXMLString())

and it printed it out correctly using quot; as the quote character. 

Does anyone have a clue as to what's going on?

Thanks,
Mark





Re: [flexcoders] XML Entity won't parse inside MXML

2009-03-16 Thread Josh McDonald
The (xml source code) - XML|XMLList stage in MXMLC isn't so good. Often I
need to embed XML as Binary objects, and go via String to parse it.

That's not much useful information though, so the answer to your problem is:

mx:XMLList id=testXml
sample badattribute={ABC}

test name=1/
test name=2/
/sample
mx:XMLList
Note that despite the similar syntax I don't think these expressions are
updated when input changes the same way bindings are. They *might* be when
you're using .MXML, but the same syntax can be used to mix XML literals and
ActionScript expressions in .as files.

-Josh

2009/3/17 markdemich d...@intellipro.com

   I have some embbeded XML inside an MXML file that I'm feeding to an
 outline. Some of my attributes need to have a quote character. It looks
 something like this

 mx:XMLList id=testXml
 sample badattribute=quot;ABCquot;
 test name=1/
 test name=2/
 /sample
 mx:XMLList

 This refuses to compile.

 I even ran a test where I omitted, the badattribute from the xml and then
 in the code I did something like this,

 testx...@test = 'ABC';
 trace(textXml.toXMLString())

 and it printed it out correctly using quot; as the quote character.

 Does anyone have a clue as to what's going on?

 Thanks,
 Mark

  




-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

Josh 'G-Funk' McDonald
  -  j...@joshmcdonald.info
  -  http://twitter.com/sophistifunk
  -  http://flex.joshmcdonald.info/


Re: [flexcoders] XML Entity won't parse inside MXML

2009-03-16 Thread Josh McDonald
Also note that the curly braces go *outside* the quotes - if you were
putting the number 7 in your attribute, it would be

element attr={7}/

If you do this:

element attr={7}/

Then your attribute will have the value of {7} instead of 7.

-Josh

2009/3/17 Josh McDonald j...@joshmcdonald.info

 The (xml source code) - XML|XMLList stage in MXMLC isn't so good. Often I
 need to embed XML as Binary objects, and go via String to parse it.

 That's not much useful information though, so the answer to your problem
 is:

 mx:XMLList id=testXml
 sample badattribute={ABC}

 test name=1/
 test name=2/
 /sample
 mx:XMLList
 Note that despite the similar syntax I don't think these expressions are
 updated when input changes the same way bindings are. They *might* be when
 you're using .MXML, but the same syntax can be used to mix XML literals and
 ActionScript expressions in .as files.

 -Josh

 2009/3/17 markdemich d...@intellipro.com

   I have some embbeded XML inside an MXML file that I'm feeding to an
 outline. Some of my attributes need to have a quote character. It looks
 something like this

 mx:XMLList id=testXml
 sample badattribute=quot;ABCquot;
 test name=1/
 test name=2/
 /sample
 mx:XMLList

 This refuses to compile.

 I even ran a test where I omitted, the badattribute from the xml and then
 in the code I did something like this,

 testx...@test = 'ABC';
 trace(textXml.toXMLString())

 and it printed it out correctly using quot; as the quote character.

 Does anyone have a clue as to what's going on?

 Thanks,
 Mark

  




 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 Josh 'G-Funk' McDonald
   -  j...@joshmcdonald.info
   -  http://twitter.com/sophistifunk
   -  http://flex.joshmcdonald.info/




-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

Josh 'G-Funk' McDonald
  -  j...@joshmcdonald.info
  -  http://twitter.com/sophistifunk
  -  http://flex.joshmcdonald.info/