我上次尝试将 TagSoup 集成到同一命令行中失败:
...\SaxonPE9-4-0-7J>java -cp saxon9pe.jar;tagsoup-1.2.1.jar
net.sf.saxon.Query --xqueryVersion:3.0 -qs:"saxon:parse-html(fn:unparsed-text('
page.html'))//*:div[@id='ps-content']"
Error on line 1 column 17
XPST0017 XQuery static error near #...:unparsed-text('page.html'))//#:
System function unparsed-text#1 is not available with this host language/ver
sion
Static error(s) in query
...\SaxonPE9-4-0-7J>java -cp saxon9pe.jar;tagsoup-1.2.1.jar
net.sf.saxon.Query --xqueryVersion:3.0 -qs:"fn:parse-html(fn:unparsed-text('pag
e.html'))//*:div[@id='ps-content']"
Error on line 1 column 14
XPST0017 XQuery static error near #...:unparsed-text('page.html'))//#:
System function unparsed-text#1 is not available with this host language/ver
sion
Static error(s) in query
...\SaxonPE9-4-0-7J>java -cp saxon9pe.jar;tagsoup-1.2.1.jar
net.sf.saxon.Query --xqueryVersion:3.0 -qs:"saxon:parse-html(collection('page.h
tml;unparsed=yes'))//*:div[@id='ps-content']"
Error on line 1 of *module with no systemId*:
FODC0002: The file or directory
file:/C:/Users/diego/Downloads/SaxonPE9-4-0-7J/page.html;unparsed=yes does not
exist
Query processing failed: Run-time errors were reported
...\SaxonPE9-4-0-7J>java -cp saxon9pe.jar;tagsoup-1.2.1.jar
net.sf.saxon.Query --xqueryVersion:3.0 -qs:"saxon:parse-html(collection('page.h
tml';'unparsed=yes'))//*:div[@id='ps-content']"
Error on line 1 column 39
XPST0003 XQuery syntax error near #...ion('page.html';'unparsed=yes'#:
expected ")", found ";"
Static error(s) in query