PDA

View Full Version : XML issue to "enter"


fiordo
01-09-2002, 10:07 AM
Hi everybody,
I'm updatind some attributes of some nodes of my XML file: the interface for writing is made in Flash and the input text field in which I write to modify the file is of the same dimensions of the text box that will work as a container.
The file then is updated and everything works well until I push enter to go on a new line at this poin the texs are not uploaded anymore on the system and I'll show you what happens:

in the input text box
______________________
|(enter enter)
|
|ok
|
|_____________________

The XML file has now been modified and when i open it with the notepad i get the following:

<showcase>
<automotive>
<progetto_1 testo_1="//<---[here you see 2 rectangles as symbol for "enter"] ok">
</progetto_1>
</automotive>
</showcase>

The XML file has now been modified and when i open it with IE i get the following:

<showcase>
- <automotive>
- <progetto_1 testo_1="ok"> // <---[ it looks like it is viewed normally]
etc ... etc...

The XML file has now been modified and when i open it with a trace i get the following:

<showcase>

<automotive>

</automotive></showcase>

and the node <progetto_1> and all its attributes disappear.

Can you hel me in solving this problem?
Thanks in advance.
Roberto.

fiordo
01-10-2002, 09:20 AM
Hi,
if i write so :

<showcase>
<automotive>
<progetto_1 testo_1="Text ... text ... END" ></progetto_1>
</automotive>
</showcase>

And if a read so to Flash :

base = datiShowcase.firstChild.childNodes[1].childNodes[1].attributes.testo_1;

It is all rigth !

But if i write XML file so :

<showcase>
<automotive>
<progetto_1 testo_1="Text ... (here i digit return on keyboard)
text ... END" ></progetto_1>
</automotive>
</showcase>

And if a read so to Flash :

base = datiShowcase.firstChild.childNodes[1].childNodes[1].attributes.testo_1;

I have this result with trace in FLash :

<showcase>

<automotive>

</automotive></showcase>


Why ? Maybe i can't digit "return" inside attributes ?I must use the node replace to attributes ?
What i do ?

Thanks in advance
Bye
Roberto