Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 05-07-2009, 04:18 PM   #1
merrittholmes
Registered User
 
Join Date: May 2009
Posts: 2
Default Problem initialising XMLList from String

I have the following string:

var doc:String = '<node label="Mike" rid="1" parent="" transtype="" category="film" family="mobiles" defaulttariffid="3232" recordtype="Asset" description="This is the test" ruleofferid="" initPrice="10.0" recurPrice="15.0" transtype="" rule="" sellable="true" termPrice="">
<node label="MikeT" rid="10" parent="1" transtype="" category="film" family="mobiles" defaulttariffid="3232" recordtype="Service Line" description="This is the test" ruleofferid="2" initPrice="10.0" recurPrice="15.0" transtype="" rule="Is Mutually Exclusive with" sellable="true" termPrice="">
<node label="James" rid="2" parent="10" transtype="" category="film" family="mobiles" defaulttariffid="" recordtype="Asset" description="This is the test" ruleofferid="10" initPrice="10.0" recurPrice="15.0" transtype="" rule="Is Mutually Exclusive with" sellable="true" termPrice="">
</node>
</node>
</node>
<node label="dsadaJames" rid="3" parent="" transtype="" category="film" family="mobiles" defaulttariffid="" recordtype="Offer" description="This is the test" ruleofferid="" initPrice="10.0" recurPrice="15.0" transtype="" rule="" sellable="true" termPrice="">
</node>'

this is constructed at runtime.

If I then use

jsList = new XMLList(doc);

I get a Error #1104

however if I use the string

var doc:String = '<node label="Mike" rid="1" parent="" transtype="" category="film" family="mobiles" defaulttariffid="3232" recordtype="Asset" description="This is the test" ruleofferid="" initPrice="10.0" recurPrice="15.0" transtype="" rule="" sellable="true" termPrice="">
<node label="MikeT" rid="10" parent="1" transtype="" category="film" family="mobiles" defaulttariffid="3232" recordtype="Service Line" description="This is the test" ruleofferid="2" initPrice="10.0" recurPrice="15.0" transtype="" rule="Is Mutually Exclusive with" sellable="true" termPrice="">
</node>
</node>
<node label="dsadaJames" rid="3" parent="" transtype="" category="film" family="mobiles" defaulttariffid="" recordtype="Offer" description="This is the test" ruleofferid="" initPrice="10.0" recurPrice="15.0" transtype="" rule="" sellable="true" termPrice="">
</node>'

its all fine.

Can anyone help me with this?
merrittholmes is offline   Reply With Quote
Old 05-07-2009, 05:38 PM   #2
wvxvw
Holosuit User
 
wvxvw's Avatar
 
Join Date: Oct 2006
Location: Tel Aviv
Posts: 4,301
Send a message via ICQ to wvxvw
Default

You have "@transtype" 2 times in one node, compile in debug mode.
besides it's really strange what you do... do you generate a string and then parse it? If so, why?
__________________
The .NET open source editor for Flash and web developers
*This would be my contribution to the project*
couchsurfing if you need it
wvxvw is offline   Reply With Quote
Old 05-08-2009, 02:29 PM   #3
merrittholmes
Registered User
 
Join Date: May 2009
Posts: 2
Default

Thanks....good spot!

Actually the string is constructed and then converted to the XMLList to be used as a data provider. Long Story....but I'm sure there are better ways of doing it.

Thanks again!
merrittholmes is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bizarre String Problem mattdude ActionScript 2.0 3 02-19-2009 08:44 PM
Query String problem PooLatka ActionScript 2.0 7 01-05-2008 11:33 PM
Simple String Comparing Problem sambishop ActionScript 2.0 3 10-02-2006 05:50 PM
Changing variable string problem! williby27 ActionScript 2.0 1 07-12-2005 02:07 PM
string manipulation problem minorscience ActionScript 1.0 (and below) 1 01-15-2003 10:27 AM


All times are GMT. The time now is 08:34 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.