hi all
can anybody explain me a little bit more xml.....
i've a xml file like this :
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE PDContainer SYSTEM "<PDContainer type="h_list">
<element>
<s>mem</s>
<f>0</f>
<f>0</f>
<f>0</f>
<f>0</f>
<f>0</f>
<f>0</f>
</element>
<element>
<s>mem</s>
<f>1</f>
<f>5</f>
<f>5</f>
<f>0</f>
<f>0</f>
<f>0</f>
</element>
</PDContainer>
with this script, i'm able to read the data of the xml:
proc cdata {data args} {
puts -nonewline $data
}
set a [open $file]
set parser [::xml:arser -characterdatacommand cdata]
$parser parse [read $a]
the result is like that:
mem
0
0
0
0
0
0
how can i get the result like that:
mem 0 0 0 0 0 0 0
i display the result in a window
i modify a value :
mem 0 0 0 0 0 0 1
i would like to save the result as the first xml file:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE PDContainer SYSTEM "<PDContainer type="h_list">
<element>
<s>mem</s>
<f>0</f>
<f>0</f>
<f>0</f>
<f>0</f>
<f>0</f>
<f>1</f>
</element>
</PDContainer>
how can i do, what do i read....
many thanks
nico
can anybody explain me a little bit more xml.....
i've a xml file like this :
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE PDContainer SYSTEM "<PDContainer type="h_list">
<element>
<s>mem</s>
<f>0</f>
<f>0</f>
<f>0</f>
<f>0</f>
<f>0</f>
<f>0</f>
</element>
<element>
<s>mem</s>
<f>1</f>
<f>5</f>
<f>5</f>
<f>0</f>
<f>0</f>
<f>0</f>
</element>
</PDContainer>
with this script, i'm able to read the data of the xml:
proc cdata {data args} {
puts -nonewline $data
}
set a [open $file]
set parser [::xml:arser -characterdatacommand cdata]
$parser parse [read $a]
the result is like that:
mem
0
0
0
0
0
0
how can i get the result like that:
mem 0 0 0 0 0 0 0
i display the result in a window
i modify a value :
mem 0 0 0 0 0 0 1
i would like to save the result as the first xml file:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE PDContainer SYSTEM "<PDContainer type="h_list">
<element>
<s>mem</s>
<f>0</f>
<f>0</f>
<f>0</f>
<f>0</f>
<f>0</f>
<f>1</f>
</element>
</PDContainer>
how can i do, what do i read....
many thanks
nico