xml - Create and manipulate xml doc widgets.
SYNOPSIS
xml docPathName ?options?STANDARD OPTIONS
docPathName options only : -file |
nodePathName options only :-content |
WIDGET-SPECIFIC OPTIONS
-file ?fileName? : file name string (*.xml or *.html).DESCRIPTION
-html : switch for open html file.
-content ?nodeContent? : node content string.
The xml command creates a xml widget and load xml fileName gived by -file option or load html fileName if switch -html exist.WIDGET COMMANDS
docPathName add root childnodePathName ?option? ?value?Create and add a childnodePathName root node to the docPathName xml doc.docPathName.nodePathName add node childnodePathName ?option? ?value?Create and add a childnodePathName node to the docPathName.nodePathName node.docPathName.nodePathName add properties ?-propertyName? ?value? ... ?-propertyName? ?value?Add properties gived by -propertyName to the docPathName.nodePathName.docPathName configure ?option? ?value? ... ?option? ?value?Configures the docPathName standard options.docPathName cget ?option?Returns the config option value.docPathName.nodePathName delete thisnode
Deletes the nodePathName itself.
replaces old command delete node
docPathName.nodePathName delete node childnodePathName
Deletes the childnodePathName from docPathName.nodePathName node.
BINDINGSReturns a root node name.docPathName.nodePathName get contentReturns the docPathName.nodePathName node content.docPathName.nodePathName get nodeslistReturns a list whose elements are all of the docPathName.nodePathName node childrens.docPathName.nodePathName get property ?-propertyName?Returns the docPathName.nodePathName property value gived by -propertyName.docPathName.nodePathName get propertieslistReturns a list whose elements are all of the docPathName.nodePathName node properties.docPathName.nodePathName set content ?value?
Set content value of docPathName.nodePathName.
docPathName.nodePathName set property ?-propertyName? ?value?
Set property value of ?-propertyName? of docPathName.nodePathName.
docPathName info namedocPathName.nodePathName info nameReturns the name (widget name) of docPathName.docPathName.nodePathName info parentReturns the name (widget name) of docPathName.nodePathName.docPathName.nodePathName info tagnameReturns the parent name of docPathName.nodePathName.docPathName save ?options?Returns the real name (tagname) of docPathName.nodePathName.Saves the docPathName content in a default file or in fileName gived by -file option.
No bindings.EXAMPLE
#!/usr/bin/wish -fpackage require KitXmll
xml .mydoc
.mydoc root node .hello -content "HELLO"
.mydoc.hello add properties -author "C.B."set id [.mydoc.hello add node .chapiter]
$id add properties -number 1 -npages 13
set id [.mydoc.hello add node .chapiter]
$id add properties -number 2 -npages 14
.mydoc save -file hello.xml
See also,
alldemos.tcl include in package.