Changes

Jump to navigation Jump to search
422 bytes added ,  12:08, 17 January 2011
moved getting started guid in from homepage.
==StartupDownload ==See the [[Startup Overview]].
==* First Operations=of all, download the latest version of [http://cms.basex.org/?id=44 BaseX].To get to know BaseX* Next, we advise to run some of download an <span class="caps">XML</span> document: [http://files.basex.org/xml/factbook.xml factbook.xml] (1.2 MB) contains statistical information on the worlds� countries. This file is also included in the following operations to see how it works Windows andget your first indentationsZIP distribution of BaseX.
===Create a database/collection===
Go to Database/New menu you can choose a folder of xml files or a single xml file
to either create a single xml file database or a collection with a bunch of xml files.
You will find some additional tabs for parser, index and full-text options:
;Parsing:Here you can change settings for the parser and choose a file for your xml catalog.;Indexes:Here you can choose what indexes to be created with the database: text index, attribute index and path summary are available: as indexes.;Full-Text:Here you can activate the full-text index. Furthermore some more options can be set, like language, wildcards and a stopword list.== Create Database ==
===Add/Delete documents===If you have opened a database you can add (Select ''Database/Add documents) or delete (Database/Delete documents) on an easy way.Just go '' → ''New'' and browse to the designated menu and follow the further stepsfactbook.xml document.
;Add documents: Choose Next, choose the OK button, and BaseX will create a file or directory to add to your databasethat you can visually explore. As <codebr />path<The [http://www.youtube.com/code> watch?v=xILHKGPGaJ4&hd=1 introductory video] gives you can enter a target path in your database, where: glimpse of some features that the new documents have to be addedBaseX GUI provides.
;Delete documents
:Enter the path of the documents which you like to delete, the info message will show you how many documents are effected.
==Example Queries =Manage databases===In the Database/Manage menu you can backup, restore, rename and drop a database.
;Backup:The backup-file is stored in Apart from the database directorybasic search facilities, BaseX offers far more sophisticated processing options to query your documents.:The file Below are some examples you might give a try. This guide is named <code>db_name-timestamp.zip</code>.;Restore:To restore the database the file with far from being a comprehensive XQuery reference, but might point you in the newest timestamp is takenright direction.
===Execute a query===For executing a query there are two ways:To execute the following queries, enter them in the XQuery Panel and hit the PLAY button.
;Search mode in the combo box of the main window:Here you can enter your query with the help of the query suggest feature, which will provide you with suggestions for path steps.=== XPath ===
;Query View:Here you can enter XPath provides an easy facility to query your query with documents in a navigational manner. It is the help basic tool of an advanced query editor all node-related operations that you encounter when using XQuery. We will start with syntax highlighting a trivial example and detailed error feedbackextend it to our needs.
If you are not familiar with XQuery, you can execute an [[Easy Search]].==== Find all Countries ====
<code> //country</code> tells BaseX to look for all <code>country</code> elements in the document. The query is introduced by two slashes <code>//</code>, which trigger the traversal of all document nodes. XPath knows several '''location steps''' that determine which nodes to consider next for evaluation. As an example, <code>//country</code> is equivalent to <code>/descendant::country</code>. ==== Find the Names of all Countries ==See also == <code> //country/name</code> This query returns the <code>name</code> children of all <code>country</code> elements. The result looks as follows: <code> <name>Albania</name><br /> <name>Andorra</name><br /> ...</code> ==== Find the Names of all Cities in Switzerland ==== The following query uses a '''predicate''' <code>[[Standalone Tutorial]...]</code> to filter all <code>country</code> nodes which have a <code>name</code> child, the string value of which is "Switzerland": <code> //country[[Server Tutorial]name = "Switzerland"]</code> To return all cities of the resulting element node, the query can be extended by a trailing <code>//city</code> path: <code> //country[[Getting Started]name = "Switzerland"]//city</code>  == What's Next? == For more information on BaseX, XQuery and XPath, [[Advanced Usage]]we invite you to... * check out our [[Category:BeginnerDocumentation]], and* have a look at the [[Categoryhttp:GUI]//www.w3schools.com/xquery/ XQuery Tutorial at W3Schools].
administrator, Bureaucrats, editor, Interface administrators, reviewer, Administrators
401

edits

Navigation menu