Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xml

Status
Not open for further replies.

sl1200mk2

Technical User
Jun 7, 2005
39
FR
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::parser -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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top