8000 GitHub - TomConlin/xpath2dot: Visualize XML document structure
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

TomConlin/xpath2dot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XPath to GraphViz dot

Started as a question on Stack Overflow a couple of years ago but now gets used often enough to keep around.

Requirements:

Simple Usage:

Starting with a XML file which might change or go away from ftp://ftp.ncbi.nlm.nih.gov/pub/clinvar/xml/sample_xml/RCV000077146.xml

wget -q ftp://ftp.ncbi.nlm.nih.gov/pub/clinvar/xml/sample_xml/RCV000077146.xml

Which I will keep a snapshot of here.

xmlstarlet el -u RCV000077146.xml | xpath2dot.awk | dot -T png > xpath2dot_demo.png

Result:

Example xpath2dot output

More Usage:

Include XML attributes and change orientation to vertical

xmlstarlet el -a RCV000077146.xml | sort -u | \
 xpath2dot.awk -v ORIENT="UD" | dot -T png > xpath2dot_demo_att.png

Result:

Example xpath2dot with attributes output

About

Visualize XML document structure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0