diff options
author | Nathan Straz <nstraz@redhat.com> | 2008-08-04 17:43:36 -0400 |
---|---|---|
committer | Nathan Straz <nstraz@redhat.com> | 2008-08-04 17:43:36 -0400 |
commit | b24a04e34392574cdab78bab048bdd73fd86997d (patch) | |
tree | 69238d02298d4e767f9c764d42c362f1d603bfa8 /gxpd.1 | |
parent | e01f689aa62ec343670bfdea5235c919666d4aba (diff) | |
download | gxpp-b24a04e34392574cdab78bab048bdd73fd86997d.tar.gz gxpp-b24a04e34392574cdab78bab048bdd73fd86997d.tar.xz gxpp-b24a04e34392574cdab78bab048bdd73fd86997d.zip |
Add gxpd to remove sections from XML files.
Diffstat (limited to 'gxpd.1')
-rw-r--r-- | gxpd.1 | 53 |
1 files changed, 53 insertions, 0 deletions
@@ -0,0 +1,53 @@ +.TH GXPD 1 "4 Aug 2008" +.SH NAME +gxpd \- Delete sections of XML documents using XPath expressions +.SH SYNOPSIS +\fBgxpd\fR [\fIoptions\fR] \fIXPATH\fR [\fIFILE\fR...] +.SH DESCRIPTION + +.B Gxpd +deletes sections from the specified XML files and saves the result in-place, +or removes the sections from a document parsed from standard input and prints +it to standard output. + +.SH ARGUMENTS + +.TP +.BI \-p " PRE" +The prefix to use in the XPath expression to match the default XML +name space in the document. XPath 1.0 does not define a way to match +the default name space when an XML document contains XML name spaces. +By specifying a default name space prefix here, you can match on the +default prefix in the document. + +.SH EXAMPLES +.nf +.B Example document +<A> + <B name="foo"> + <C>C of foo</C> + </B> + <B name="bar"> + <C>C of bar</C> + </B> + <B name="baz"> + <C>C of baz</C> + </B> +</A> + +.B # gxpd "/A/B[@name='baz']" example.xml +Removed 1 nodes +.B # cat example.xml +<?xml version="1.0"?> +<A> + <B name="foo"> + <C>C of foo</C> + </B> + <B name="bar"> + <C>C of bar</C> + </B> + +</A> + +.SH "SEE ALSO" +gxpp(1), http://www.w3.org/TR/xpath |