Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:basex:fedora
BaseX
_service:download_files:basex.1
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:download_files:basex.1 of Package BaseX
.\"Text automatically generated by txt2man .TH basex 1 "26 June 2012" "" "The XML Database" .SH NAME \fBbasex \fP- XML database system and XPath/XQuery processor (command line mode) \fB .SH SYNOPSIS .nf .fam C \fBbasex\fP [\fB-bcdiLosuvVwxz\fP] [\fIquery\fP] .fam T .fi .fam T .fi .SH DESCRIPTION \fBbasex\fP is a fast and powerful, yet light-weight and platform independent XML database system and XPath/XQuery processor. .SH OPTIONS A short description of option can be obtained from .PP .nf .fam C $ basex \-h .fam T .fi or by browsing http://docs.basex.org/wiki/Startup_Options#BaseX_Standalone .SH DATABASE COMMANDS A list of supported Database commands can be obtained from .PP .nf .fam C $ basex \-c help .fam T .fi or by browsing http://docs.basex.org/wiki/Commands .SH EXAMPLES .IP \(bu 3 XQuery evaluation (no database, no interaction, script mode): .PP .nf .fam C $ basex \-Lq 19+23 42 $ basex \-Lq "<answer>{ 23+19 }</answer>" <answer>42</answer> .fam T .fi .IP \(bu 3 Import an XML file into database, output its content (\fIquery\fP its root) and be verbose: .PP .nf .fam C $ basex \-Vc "CREATE DB input /usr/share/doc/basex/examples/input.xml; XQUERY /" Database 'input' created in 136.84 ms. <html> <!-- Header --> <head id="0"> <title>XML</title> </head> <!-- Body --> <body id="1" bgcolor="#FFFFFF" text="#000000" link="#0000CC"> <h1>Databases & XML</h1> <div align="right"> <b>Assignments</b> <ul> <li>Exercise 1</li> <li>Exercise 2</li> </ul> </div> </body> <?pi bogus?> </html> Query: / Compiling: Result: root() Parsing: 5.08 ms Compiling: 27.2 ms Evaluating: 0.87 ms Printing: 13.7 ms Total Time: 46.86 ms Hit(s): 1 Item Updated: 0 Items Printed: 358 Bytes Query executed in 42.52 ms. .fam T .fi .IP \(bu 3 XPath evaluation (with existing database): .PP .nf .fam C $ basex \-Lc "OPEN input; XQUERY //li[1]" <li>Exercise 1</li> .fam T .fi .IP \(bu 3 Retrieve XML from the web and perform XPath \fIquery\fP: .PP .nf .fam C $ basex \-Lq "doc('http://files.basex.org/examples/input.xml')//li" <li>Exercise 1</li> <li>Exercise 2</li> .fam T .fi .IP \(bu 3 W3C XQuery Full-Text (make use of full-text index and perform fuzzy \fIquery\fP with a typing error): .PP .nf .fam C $ basex BaseX 7.1 [Standalone] Try "help" to get more information. > SET FTINDEX on Full-Text Index: ON > CREATE DB input /usr/share/doc/basex/examples/input.xml Database 'input' created in 94.42 ms. > XQUERY //b[text() contains text 'Asisgnment' using fuzzy] <b>Assignments</b> Query executed in 8.37 ms. .fam T .fi .IP \(bu 3 Update the database and show result: .PP .nf .fam C > XQUERY delete node //ul Query executed in 2.79 ms. > XQUERY replace value of node //b with 'Debian rules' Query executed in 2.94 ms. > XQUERY //div <div align="right"> <b>Debian rules</b> </div> Query executed in 1.01 ms. .fam T .fi .IP \(bu 3 Open an input xml file, execute a \fIquery\fP and write result into file: .PP .nf .fam C $ basex \-Li /usr/share/doc/basex/examples/input.xml \-q //div \-o out.xml $ cat out.xml <div align="right"> <b>Assignments</b> <ul> <li>Exercise 1</li> <li>Exercise 2</li> </ul> </div> .fam T .fi .IP \(bu 3 Query an already existing database called 'input'. If a file named 'input' exists in current working directory it takes precedence: .PP .nf .fam C $ basex \-Li input \-q //div <div align="right"> <b>Assignments</b> <ul> <li>Exercise 1</li> <li>Exercise 2</li> </ul> </div> .fam T .fi .IP \(bu 3 Let \fBbasex\fP process \fIquery\fP input from standard in: .PP .nf .fam C $ echo '19+23' | basex \-Lq\- 42 .fam T .fi .IP \(bu 3 Execute commands from script file: .PP .nf .fam C $ cat commands.txt create db debian <debian_db/> xquery / list $ basex \-LC commands.txt | grep debian <debian_db/> debian 1 4639 debian.xml .fam T .fi .IP \(bu 3 Parse non well-formed HTML (needs libtagsoup-java installed): .PP .nf .fam C $ cat bad.html <html> <ul> <li>A <li>B </ul> </html> $ basex \-c 'set parser html; set htmlopt method=html,nons=true; create db htmldb bad.html' $ basex \-q "doc('htmldb')" <html> <body> <ul> <li>A</li> <li>B</li> </ul> </body> </html> For further documentation on how to configure the HTML Parser refer to http://docs.basex.org/wiki/Parsers#HTML_Parser .fam T .fi .SH SEE ALSO \fBbasexgui\fP(1), \fBbasexserver\fP(1), \fBbasexclient\fP(1) .TP .B ~/.\fBbasex\fP BaseX (standalone and server) properties .TP .B ~/.basexgui BaseX additional GUI properties .TP .B ~/.basexperm user name, passwords, and permissions .TP .B ~/.basexevents contains all existing events .TP .B ~/BaseXData Default database directory .TP .B ~/BaseXData/.logs Server logs .TP .B ~/BaseXRepo Package repository .PP BaseX Documentation Wiki: http://docs.basex.org .SH HISTORY BaseX started as a research project of the Database and Information Systems Group (DBIS) at the University of Konstanz in 2005 and soon turned into a feature-rich open source XML database and XPath/XQuery processor. .SH LICENSE New (3-clause) BSD License .SH AUTHOR BaseX is developed by a bunch of people called 'The BaseX Team' <http://basex.org/about-us/> led by Christian Gruen <cg@basex.org>. .PP The man page was written by Alexander Holupirek <alex@holupirek.de> while packaging BaseX for Debian GNU/Linux.
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor