Skip to content

chubert-ch/xpathOnHtml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

xpathOnHtml

Under construction: a python script to run xpath on html files (eventually)

Currently using inferred-namespace xpath (e.g. it'll try and infer that //foo should match //bar:foo if bar is the default namespace prefix) to query for every fragment matching that xpath in the given file/directory, with a bunch of options for output:

Find xml things specified by given xpaths

positional arguments:
  xpath                 xpath to search with, doesnt need standard corefiling
                        namespaces
  path                  path to search in, can be a file, directory or list of
                        files

optional arguments:
  -h, --help            show this help message and exit
  -p, --paths           output paths of found files
  -l, --linenumnode     output line number of node
  -F, --fullnode        output entire node
  -i, --inlinedfullnode
                        output entire node on one line
  -t, --toplinenode     output top line of node
  -c, --content         output content of node
  -n, --nonamespace     xpath wont attempt to infer namespaces
  -m NAMESPACEMAP, --namespacemap NAMESPACEMAP
                        namespace mapping in the form of
                        "prefix=http://example.com". Can repeat.

About

python script to run xpath on html files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages