The goal of this demo is to show how the remove tool of the CLaRK system can be used for deletion of information from XML documents.
The Remove tool is used for removing parts from XML document with or without their subtrees
The goal here is to remove all whitespace elements from the document. They contain spaces, symbols for new line, etc.
The document used for this demo
is Standart20030524remove.tag.
In order to run the demo you have to perform the following steps:
Standart20030524remove.tagis loaded
in the system. If it is not, then load it as it is described in Import XML Tool Demo. If it is, open
it.p element in the Tree View and expand
its subtree. whitespace elements by Ctrl and Left
mouse click.Delete
Node (to remove only selected nodes) or Delete Subtree (to
remove elements and their descendant elements) from the menu.Tools.XPath write the following XPath expression :
//whitespace which selects all the whitespace elements within the
document(s).Delete subtree option to remove elements with their
subtree.The dialog of the tool in this case has to be:

Multiple
Apply. Then a new part of the dialog appears in which you have to select
the documents from the corresponding document groups via the button Add
Documents.Options and then Overwrite radio
button. Then return to the main dialog.The above query is saved in document whitespace.rem.que in the
demo directory.
The goal here is to remove all tok elements that have
welement as their child from the document.
The document used for this demo is
Standart20030524remove.tag.
In order to run the demo you have to perform the following steps:
Standart20030524remove.tagis loaded
in the system. If it is not, then load it as it is described in Import XML Tool Demo. If it is, open
it.Tools.XPath write the following XPath expression :
//tok[child::w] which selects all tok elements that
have welement as their child within the document(s).Delete subtree option to remove only elements
without their subtree.The dialog of the tool in this case has to be:

Multiple
Apply. Then a new part of the dialog appears in which you have to select
the documents from the corresponding document groups via the button Add
Documents.Options and then Overwrite radio
button. Then return to the main dialog.The above query is saved in document tok.rem.que in the demo
directory.