Usage: ./xmlgrep [-dD DELIM] [-f file] [-pxSThVNc] path.to.node:prop=value Version: (v1.53) [PCRE][XMLSERVER] -f file - use file -d delim - delimiter to use -D delim - replace delimiter with this -x - remove all textnodes. -q - silent. -g - global search. -S - do not use xmlserver. -K - kill any active xmlserver (on this file). -T - make sure to print the toplevel node (useful for further stacked greps) -p - do NOT prune unmatched nodes -c - print only children at the matched level -N - loadtest. Do nothing after parsing xmlfile. value - if '*' matches any value. Path format: PATH = NODE(.NODE)* NODE = NAME(:SELECTOR)* SELECTOR = PROP(=|!=|~=)([*]|VALUE) When using PCRE ( prop~=regex ) be careful to escape any '.'s. That is "ab.*z" must be given as "ab\.*z". returns nodes without LFs. Usage: xmlngrep [-d DELIM] [-f file] [-gh] node prop value Version: (v1.53) -f file - use file -d delim - delimiter to use -p [@|B|P|C|S] - property delimiter to use B = spaces P = parenthesis C = curly braces S = square braces -g - global search -x - remove all textnodes. returns nodes without LFs. Usage: ./xmlfmt [-d DELIM] [-f file] [-tspuUwh] path.to.node:prop Version: (v1.53) -f file = use file -p = prune matched nodes -u = keep output as UTF8 -n = dont print newlines -w = wrap values containing whitespace -s = strip whitespace from ends of string -U = replace whitespace with underscore (in prop values). -t = dont add toplevel node to input -V = print version -e = use default if prop empty but existing -d DELIM = set delimiter to first char in arg node:prop = print value of nodes property node.subnode:prop = print value of nodes subnodes property %node = prune last node after match @node = print textual value of node {text}node:prop = prefix value with text {text} = print text, always match /{dflt}node:prop = print default text if prop missing Special props: * = values of all properties ? = print the names of all properties ?* = print the names and values of all properties: NAME=VALUE %@/{dflt}{pre}{post}path:prop Usage: ./xmlmod (v1.53) [-abcfgsSTnvVh] path.to.node:prop/value -g --global = go down all matching paths, not just the first matching path. -a --all = modify every matching node, disregarding paths. -b --bind = create new nodes adjecent to another node of same name. -f --file = file to use. -h --help = this message. -v --version= print version. -V --verbose= debugging information. -s --stdin = read paths from stdin. -S --sort = sorting mode. -T --treesort = sorting mode, using tree sort. -n --nonumsort = dont use numerical sorting. -c --chain = chain paths. Only nodes matched in previous paths are accessible. node:prop/VAL - matching criteria node:prop//VAL - set value of prop to VAL node:prop/// - remove property from node node:prop/OLD/NEW - set prop to NEW if current value is OLD NODE = textual name of node or '@' to denote a textnode MATCH = PROP/"VALUE" ASSIGN = PROP//"VALUE" DELETE_PROP = PROP/// MATCH_ASSIGN = PROP/"OLD"/"NEW" MATCH_ASSIGN will be split into MATCH + ASSIGN. o For an ASSIGN to be performed on a node all MATCHes must evaluate to true. o If any MATCH fails and ADD is true => then a new node is created that evaluates true to all MATCHes. This new node is also subjected to all ASSIGNs. ACTION = MATCH | ASSIGN | DELETE_PROP | MATCH_ASSIGN ADD = '+'[PRELF POSTLF] DELETE = '^'[PRELF POSTLF] STMT = [ADD|DELETE]NODE(:ACTION)* PATH = STMT(.STMT)* Textnodes: Textnodes are indicated by giving "@" instead of "NODE:PROP". @/"VALUE" to match. @//"VALUE" to assign. @"/"MATCH"/"VALUE" to assign if matched. --chain nodes matched in first path are marked as ALLOW. next path will only compare successfully against ALLOW-nodes. with ADD-flag compares against all nodes (not restrained by ALLOW). Examples: xmlmod path.to:prop/val.node:prop/old/new xmlmod test.out.+@//hello xmlmod path.to.+11create:prop//value