Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oleksiyp/xml-grep
XML grep tool.
https://github.com/oleksiyp/xml-grep
Last synced: about 1 month ago
JSON representation
XML grep tool.
- Host: GitHub
- URL: https://github.com/oleksiyp/xml-grep
- Owner: oleksiyp
- Created: 2011-11-08T16:11:38.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2014-03-12T14:58:19.000Z (almost 11 years ago)
- Last Synced: 2024-10-14T21:53:03.147Z (3 months ago)
- Language: Java
- Size: 125 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.textile
Awesome Lists containing this project
README
h1. XML grep tool
h2. Commandline usage
Argument "file/url" is required
java -jar xmlgrep.jar [options...] file/url entryPath [matchesField...]
file/url : File or URL to parse
entryPath : Period('.') separated path to the
element where xml extraction starts e.g.
'ROOT Element'.'subelement'.'subsubelemen
t'
matchesField : Pairs field=value to match field(which
is indeed path inside entry) and value -
value to match
-c (--contain) field=value : Matches text
-ec (--exclude-contain) field=value : Does not match text
-em (--exclude-match) field=value : Does not contains text
-ep (--exclude-pattern) field=value : Does not match pattern
-m (--match) field=value : Contains text
-of (--output-format) VAL : Output format - any expression like:
"#{value1} #{subelement.value2}"
-ot (--output-type) VAL : Type of output: text, xml, json
-p (--pattern) field=value : Match patternh3. Example1
Gets dependecies from pom file.
java -jar xmlgrep-1.0.jar pom.xml project.dependencies.dependency -of "#{groupId}:#{artifactId}:#{version}"h3. Example2
Gets entries from virus database. Searching dropbox or hotfile
java -jar xmlgrep-1.0.jar http://support.clean-mx.de/clean-mx/xmlviruses.php output.entries.entry -of "#{domain} #{ip}" -c domain=dropbox -c domain=hotfileh3. Example3
Gets entries from virus database. Searching domain contains dropbox and virusname contains Dropper.
java -jar xmlgrep-1.0.jar http://support.clean-mx.de/clean-mx/xmlvirusephp output.entries.entry -of "#{domain} #{ip} #{virusname}" -c domain=dropbox,virusname=Dropperh3. Example4
Gets entries from virus database. Searching ip matches the pattern "64\.120\.227\.\d+"
java -jar xmlgrep-1.0.jar http://support.clean-mx.de/clean-mx/xmlvirusephp output.entries.entry -of "#{domain} #{ip} #{virusname}" -p ip=64\.120\.227\.\d+