|
-
XML and Flash
Hi
I have a XML attribute that looks something like this:
address = "Some address 22 Some postalcode 4030"
I need to present this data in a textfield like this
Some address 22
Some postalcode 4030
With newlines
I tried to put newlines "\r" in the attrubute value,
but that did not work 
I also tried to break the text in the XML without success, eg:
address="Some address 22
Some postalcode 4030"
So now I have this solution:
Put a | between Some address 22 and postalcode 4030
And split the string in Flash and present it like this:
textfield.text = address[0] + "\r" + address[1]
Does anyone have another maybe better solution?
Thanks in advance for tips
best regards
T
-
Registered User
hi,
Can't you change your XML?
For example, use two attributes:
Code:
address = "Some address 22" postalcode = "Some postalcode 4030"
This way you'd be only thinking about the content, not the final display.
Isn't this what XML is about?
Last edited by nunomira; 09-19-2004 at 10:06 PM.
-
I tried to put newlines "\r" in the attrubute value,
The newline character in Flash is "\n" and not "\r".
However, nunomira is also correct that if you have separate data elements, it makes sense to separate them out in the XML so that you can do searches by postalcode or address (for example).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|