View Full Version : XML and mixed content
gilbert
08-28-2001, 02:45 PM
hi
I'm (again) in a situation where deadline is approaching way too fast...
here's how my xml file looks:
<text>Blaah blaah blaah <picturelink number="1" src="name_of_file.jpg" type="3D">link word</picturelink> and blaah blaah goes on until next link... </text>
How do i get Flash to recognise mixed content? Changing structure of XML file is not an option.
tia
*gilbert*
Jesse
08-29-2001, 03:29 AM
as in you want the middle tag to be HTML formatted? you have to escape the <'s and >'s. We've discussed this previously when using HTML bold in XML. search it out.
gilbert
08-29-2001, 06:54 AM
Thanks for answer...
But i still can't see how that is going to solve my problem.
Unless i write XSL file and transform all my <picturelink> tags on every XML file (about 700) to < picturelink >... which wouldn't be very practical.
I want to use the *whole* content of the <text> element but instead Flash returns:
<text>
<picturelink number="1" src="name_of_file.jpg" type="3D">link word</picturelink>
</text>
Totally ignoring "Blaah Blaah..." text content of the element. Also nodeType returns 1 (=element) while it contains also text.
-gil
jakkub
09-05-2001, 10:32 AM
Seems you handle blaah blaah as the value of <text> node. I think that blaah blaah is child of <text>, not its value.
so structure looks like this
------------------------
<text>
childnode blaaah blaaah
childnode <picturelink>
etc.
------------------------
Try to look at it in debugger, you should see something like "parsing tree" there
gilbert
09-07-2001, 02:37 PM
I think it's just that Flash can't handle mixed content. I traced the whole xml file after addressing it to "myXML" object...
If element contains both text and child elements it doesn't even show it on Output window.
maybe i should use director instead.
*gilbert
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.