Revision [1931]

Last edited on 2014-08-12 12:32:24 by DavidLee
Additions:
NOTE: This program is being replaced by xedit with better control over editing features
||-rx,-replacex xpath||Replace matched node with evaluation of xpath with context at current node||


Revision [1227]

Edited on 2010-02-15 10:13:35 by DavidLee
Additions:
||-i,-input input|| use input as the source xml document, otherwise stdin
||-n||do not use a source context||
||-r,-replace expr||replace expr. If replace is string then replace the child text of matching nodes,
||-d ||Delete matching expression||
||-a,-add expr||Adds the expression (string, element, attribute) to all matching nodes||
||-e,-xpath xpath-expr||xpath expression||
||-m,-matches matches-expr||XSLT matches expression||
||-ren,-rename string||Renames the matching element or attribute to a new name||
Deletions:
||-i input
-input input|| use input as the source xml document, otherwise stdin
||-n ||do not use a source context||
||-r replace expr
-replace expr||replace expr. If replace is string then replace the child text of matching nodes,
||-d ||Delete matching expression||
||-a expr
-add expr||Adds the expression (string, element, attribute) to all matching nodes||
||-xpath xpath-expr
-e xpath-expr ||xpath expression||
||-matches matches-expr
-m matches-expr ||XSLT matches expression||
||-ren string
-rename string||Renames the matching element or attribute to a new name||


Revision [1197]

Edited on 2010-02-13 07:20:41 by DavidLee
Additions:
**xed** evaluate an xpath expression and edits every matching node outputing the result document
Deletions:
**xed** evaluate an XPATH expression and edits every matching node outputing the result document


Revision [1161]

Edited on 2010-02-05 14:31:04 by DavidLee
Additions:
[[CommandXaddattribute xaddattribute]]
[[CommandXdelete xdelete]]


Revision [1160]

Edited on 2010-02-05 14:16:26 by DavidLee
Additions:
Replace the /root/foo2 element with <bletch/>
xed -r <[<bletch/>]> -e /root/foo2
Deletions:
Replace the foo element with bletch
xed <[<bletch/>]> -e /root/foo2


Revision [1159]

Edited on 2010-02-05 14:15:58 by DavidLee
Additions:
Replaces the the node matching the xpath express //node with a text node "text" from the file "file.xml" , send to output.
Add the child element under the root element
xed -a <[ <child/> ]> -xpath /root
Replace the foo element with bletch
xed <[<bletch/>]> -e /root/foo2
Deletions:
Replaces the the node matching the xpath express //node with a text node "text"


Revision [1158]

Edited on 2010-02-05 13:42:21 by DavidLee
Additions:
Deletes all nodes where the file[@name eq 'test']
xed -d -matches "file[@name eq 'test']"


Revision [1157]

Edited on 2010-02-05 13:37:31 by DavidLee
Additions:
====Examples====
Replaces the the node matching the xpath express //node with a text node "text"
Adds an attribute to all file elements
xed -a -matches file <[ attribute { "attr" } { "value" } ]>
Deletions:
====Example====


Revision [1156]

Edited on 2010-02-05 13:35:19 by DavidLee
Additions:
xed [ [[SerializationOptions serialization options]] ] [options]
====Options====
||-r replace expr
-replace expr||replace expr. If replace is string then replace the child text of matching nodes,
||-a expr
-add expr||Adds the expression (string, element, attribute) to all matching nodes||
Deletions:
xed [ [[SerializationOptions serialization options]] ] [-i input] [-r replace] [-rename rename] [-d] [-n] [-e xpath-expr | -matches matches-expr] [-v name value [name value ...]]
||-r replace
-replace replace||replace expr. If replace is string then replace the child text of matching nodes,


Revision [1040]

Edited on 2009-11-25 18:11:38 by DavidLee
Additions:
xed -i file.xml -r text //node
Deletions:
$ xed -i file.xml -r text //node


Revision [927]

Edited on 2009-11-24 17:59:54 by DavidLee
Additions:
[[Commands]]


Revision [926]

Edited on 2009-11-24 17:59:32 by DavidLee
Additions:
||-v||Read remaining pairs of arguments as name/value pairs to assign as xpath variables||
Deletions:
-v||Read remaining pairs of arguments as name/value pairs to assign as xpath variables||


Revision [925]

Edited on 2009-11-24 17:59:17 by DavidLee
Additions:
||-n ||do not use a source context||
Deletions:
||-n ||do not use a source context||


Revision [924]

Edited on 2009-11-24 17:59:00 by DavidLee
Additions:
if replace is an XML expression then replace the matching node with the expression.||
Deletions:
if replace is an XML expression then replace the matching|| node with the expression.||


Revision [923]

Edited on 2009-11-24 17:58:35 by DavidLee
Additions:
xed [ [[SerializationOptions serialization options]] ] [-i input] [-r replace] [-rename rename] [-d] [-n] [-e xpath-expr | -matches matches-expr] [-v name value [name value ...]]
||-i input
-input input|| use input as the source xml document, otherwise stdin
if input is an XML expression then use it directly (dont treat as filename).||
||-n ||do not use a source context||
||-r replace
-replace replace||replace expr. If replace is string then replace the child text of matching nodes,
if replace is an XML expression then replace the matching|| node with the expression.||
||-d ||Delete matching expression||
||-xpath xpath-expr
-e xpath-expr ||xpath expression||
||-matches matches-expr
-m matches-expr ||XSLT matches expression||
||-ren string
-rename string||Renames the matching element or attribute to a new name||
-v||Read remaining pairs of arguments as name/value pairs to assign as xpath variables||
Supports the standard [ [[SerializationOptions serialization options]] ]
Deletions:
xed [-i input] [-r replace] [-d] [-n] [-e xpath-expr | -matches matches-expr] [-v name value [name value ...]]
-i input use input as the source xml document, otherwise stdin
if input is an XML expression then use it directly (dont treat as filename).
-n do not use a source context
-r replace replace expr. If replace is string then replace the child text of matching nodes,
if replace is an XML expression then replace the matching node with the expression.
-d Delete matching expression
-xpath xpath-expr
-e xpath-expr xpath expression
-matches matches-expr
-m matches-expr XSLT matches expression
-ren
-rename string Renames the matching element or attribute to a new name
-v Read remaining pairs of arguments as name/value pairs to assign as xpath variables


Revision [884]

Edited on 2009-11-24 10:46:34 by DavidLee
Additions:
-ren
-rename string Renames the matching element or attribute to a new name


Revision [793]

Edited on 2009-09-17 07:10:18 by DavidLee
Additions:
xed [-i input] [-r replace] [-d] [-n] [-e xpath-expr | -matches matches-expr] [-v name value [name value ...]]
-d Delete matching expression
Deletions:
xed [-i input] -r replace [-n] [-e xpath-expr | -matches matches-expr] [-v name value [name value ...]]


Revision [782]

Edited on 2009-09-16 08:00:17 by DavidLee
Deletions:
[[CommandsInternal]]


Revision [398]

Edited on 2009-01-12 17:36:19 by DavidLee
Additions:
xed [-i input] -r replace [-n] [-e xpath-expr | -matches matches-expr] [-v name value [name value ...]]
Deletions:
xpath [-i input] -r replace [-n] [-e xpath-expr | -matches matches-expr] [-v name value [name value ...]]


Revision [397]

Edited on 2009-01-12 17:30:21 by DavidLee
Additions:
======Command xed======
Deletions:
======Command xpath======


Revision [362]

Edited on 2009-01-03 07:40:12 by DavidLee
Deletions:
-f xpath-file read xpath expression from file


Revision [361]

Edited on 2009-01-03 07:40:01 by DavidLee
Additions:
xpath [-i input] -r replace [-n] [-e xpath-expr | -matches matches-expr] [-v name value [name value ...]]
-xpath xpath-expr
-e xpath-expr xpath expression
-matches matches-expr
-m matches-expr XSLT matches expression
Deletions:
xpath [-f xpath-file] [-i input] -r replace [-n] [-e xpath-expr | -matches matches-expr] [-v name value [name value ...]]
xpath-expr xpath expression
matches-expr XSLT matches expression


Revision [359]

Edited on 2009-01-03 07:14:25 by DavidLee
Additions:
xpath [-f xpath-file] [-i input] -r replace [-n] [-e xpath-expr | -matches matches-expr] [-v name value [name value ...]]
matches-expr XSLT matches expression
[[CommandsInternal]]
Deletions:
xpath [-f xpath-file] [-i input] -r replace [-n] xpath-expr [-v name value [name value ...]]


Revision [241]

The oldest known version of this page was created on 2008-07-04 09:16:21 by DavidLee
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki