apt forおよび解析JAR
によってインストールされたファイルを使用することは、次のようにワンライナーです。Saxon-HE
tagsoup
html
thufir@dur:~/saxon$
thufir@dur:~/saxon$ java -cp /usr/share/java/Saxon-HE-9.8.0.14.jar:/usr/share/java/tagsoup-1.2.1.jar net.sf.saxon.Query -x:org.ccil.cowan.tagsoup.Parser -qs:doc\(\'http://books.toscrape.com/\'\)
<?xml version="1.0" encoding="UTF-8"?><!--[if lt IE 7]> <html lang="en-us" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--><!--[if IE 7]> <html lang="en-us" class="no-js lt-ie9 lt-ie8"> <![endif]--><!--[if IE 8]> <html lang="en-us" class="no-js lt-ie9"> <![endif]--><!--[if gt IE 8]><!--><html xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml" class="no-js" lang="en-us"><!--<![endif]--><head><title>
All products | Books to Scrape - Sandbox
..
<!-- Version: N/A -->
thufir@dur:~/saxon$
thufir@dur:~/saxon$
Javaからそれを行うにはどうすればよいですか?Saxon
特に、この実行に はどのインポートが必要ですか? おそらくSaxon
JAXPインターフェースを使用していますか?
また:
http://codingwithpassion.blogspot.com/2011/03/saxon-xslt-java-example.html