Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/rxm.git
README.md
produce structured documents.
+# Usage
+
+This section shows how to use the Java API to query a database and generate
+an XML document based on **rxm**. Review the
+[JDBC documentation](http://docs.oracle.com/javase/tutorial/jdbc/basics/connecting.html) to understand how database connections are established.
+
+## Basic
+
+Use the **rxm** Java API to generate an XML document as follows:
+
+```
+import com.whitemagicsoftware.rxm.RelationMap;
+
+public class QueryTest {
+ public static void main( String args[] ) throws Exception {
+ RelationMap rxm = new RelationMap(
+ "root > people," +
+ "person > person," +
+ ".*,"
+ );
+
+ System.out.println( rxm.toXML( getConnection() ) );
+ }
+}
+```
+
+## Modules
+
+The **rxm** API allows the definition of modules, such as:
+
+```
+import com.whitemagicsoftware.rxm.RelationMap;
+
+public class QueryTest {
+ public static void main( String args[] ) throws Exception {
+ RelationMap rxm = new RelationMap(
+ "module person," +
+ "person > person," +
+ ".*,"
+ );
+
+ rxm.addExpression( "root > people, import person," );
+
+ System.out.println( rxm.toJSON( getConnection() ) );
+ }
+}
+```
+
+
# Syntax
address > address,
.*,
-```
-
-
-# Usage
-
-This implementation provides a Java API for building SQL statements
-that produce XML documents based on **rxm**. Review the
-[JDBC documentation](http://docs.oracle.com/javase/tutorial/jdbc/basics/connecting.html) to obtain a database connection.
-
-## Basic
-
-Use the **rxm** Java API to generate an XML document as follows:
-
-```
-import com.whitemagicsoftware.rxm.RelationMap;
-
-public class QueryTest {
- public static void main( String args[] ) throws Exception {
- RelationMap rxm = new RelationMap(
- "root > people," +
- "person > person," +
- ".*,"
- );
-
- System.out.println( rxm.toXML( getConnection() ) );
- }
-}
-```
-
-## Modules
-
-The **rxm** API allows the definition of modules, such as:
-
```
-import com.whitemagicsoftware.rxm.RelationMap;
-
-public class QueryTest {
- public static void main( String args[] ) throws Exception {
- RelationMap rxm = new RelationMap(
- "module people," +
- "root > people," +
- "person > person," +
- ".*,"
- );
-
- rxm.setQuery( "import people," );
- System.out.println( rxm.toXML( getConnection() ) );
- }
-}
-```
# Requirements

Reordered usage content.

Author Dave Jarvis <email>
Date 2015-02-10 17:40:31 GMT-0800
Commit 63ab6a279a52512f4df6584e00affa5e3c9a02b2
Parent 32feff0
Delta 49 lines added, 49 lines removed