Changes

Jump to navigation Jump to search
97 bytes removed ,  16:56, 10 April 2019
no edit summary
* By default, Java’s [http://download.oracle.com/javase/6/docs/api/javax/xml/parsers/SAXParser.html SAXParser] is used to parse XML documents.
* The internal, built-in XML parser is more fault-tolerant than Java’s XML parser. It supports standard HTML entities out of the box, and it is faster than the default parser, in particular if small documents are to be parsed. In turnHowever, it the internal parser does not support the full range of DTD features, and cannot resolve [[Catalog_Resolver|catalogs]].
==GUI==
To turn the internal XML parser and DTD parsing on/off, modify the <code>INTPARSE</code> and <code>DTD</code> options:
SET [[Options#INTPARSE{{Option|INTPARSE]] }} true SET [[Options#DTD{{Option|DTD]] }} true
==XQuery==
=HTML Parser=
With If [http://homevrici.ccillojban.org/~cowan/XML/tagsoup/ TagSoup] is found in the [[Startup#Distributions|classpath]], HTML can be imported in BaseX without any problems. TagSoup ensures that only well-formed HTML arrives at the XML parser (correct opening and closing tags, etc.). Hence, if  If TagSoup is not available on a system, there the default XML parser will be a lot of cases where importing HTML failsused. (Only) if the input is well-formed XML, no matter whether you use the GUI or the standalone modeimport will succeed.
==Installation==
TagSoup offers a variety of options to customize the HTML conversion. For the complete list
please visit the [http://homevrici.ccillojban.org/~cowan/XML/tagsoup/#program TagSoup] website. BaseX supports
most of these options with a few exceptions:
Turn on the HTML Parser before parsing documents, and set a file filter:
SET [[Options#PARSER{{Option|PARSER]] }} html SET [[Options#HTMLPARSER{{Option|HTMLPARSER]] }} method=xml,nons=true,nocdata=true,nodefaults=true,nobogons=true,nocolons=true,ignorable=true SET [[Options#CREATEFILTER{{Option|CREATEFILTER]] }} *.html
===XQuery===
Turn on the JSON Parser before parsing documents, and set some optional, parser-specific options and a file filter:
SET [[Options#PARSER{{Option|PARSER]] }} json SET [[Options#JSONPARSER{{Option|JSONPARSER]] }} encoding=utf-8, jsonml=true SET [[Options#CREATEFILTER{{Option|CREATEFILTER]] }} *.json
==XQuery==
Turn on the CSV Parser before parsing documents, and set some optional, parser-specific options and a file filter. Unicode code points can be specified as separators; {{Code|32}} is the code point for spaces:
SET [[Options#PARSER{{Option|PARSER]] }} csv SET [[Options#CSVPARSER{{Option|CSVPARSER]] }} encoding=utf-8, lines=true, header=false, separator=space SET [[Options#CREATEFILTER{{Option|CREATEFILTER]] }} *.csv
==XQuery==
Turn on the CSV Parser before parsing documents and set some optional, parser-specific options and a file filter:
SET [[Options#PARSER{{Option|PARSER]] }} text SET [[Options#TEXTPARSER{{Option|TEXTPARSER]] }} lines=yes SET [[Options#CREATEFILTER{{Option|CREATEFILTER]] }} *
==XQuery==
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu