summaryrefslogtreecommitdiffstats
path: root/gxpm.1
diff options
context:
space:
mode:
authorNathan Straz <nstraz@redhat.com>2008-08-05 09:58:59 -0400
committerNathan Straz <nstraz@redhat.com>2008-08-05 09:58:59 -0400
commitbb778c05dd86986c19fbd14bb8e7ffaa91634427 (patch)
treedf5216031bab2a3ab730c778d3265cff48580f47 /gxpm.1
parentb24a04e34392574cdab78bab048bdd73fd86997d (diff)
downloadgxpp-bb778c05dd86986c19fbd14bb8e7ffaa91634427.tar.gz
gxpp-bb778c05dd86986c19fbd14bb8e7ffaa91634427.tar.xz
gxpp-bb778c05dd86986c19fbd14bb8e7ffaa91634427.zip
Add gxpm which allows us to add things to XML files.
Diffstat (limited to 'gxpm.1')
-rw-r--r--gxpm.154
1 files changed, 54 insertions, 0 deletions
diff --git a/gxpm.1 b/gxpm.1
new file mode 100644
index 0000000..f5ce915
--- /dev/null
+++ b/gxpm.1
@@ -0,0 +1,54 @@
+.TH GXPM 1 "3 July 2008"
+.SH NAME
+gxpm \- Merge XML documents using XPath expressions
+.SH SYNOPSIS
+\fBgxpm\fR [\fIoptions\fR] \fIXPATH\fR [\fIFILE\fR...] < \fIXML\fR
+.SH DESCRIPTION
+
+.B Gxpm
+takes an XML document from standard input and merges into \fIFILE\fR
+as a child of the locations which match XPATH. Changes are done in-place
+to \fIFILE\fR.
+
+.SH OPTIONS
+
+.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 # echo '<B name="frank"/>' | gxpm '/A' example.xml
+.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>
+
+<B name="frank"/></A>
+
+.fi
+
+.SH "SEE ALSO"
+gxpp(1), gxpd(1), grep(1), http://www.w3.org/TR/xpath