Get XQilla at SourceForge.net. Fast, secure and Free Open Source software downloads

XQilla : DOM3API

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register
Most recent edit on 2011-11-16 00:21:47 by JohnSnelson [Reverted to version from 2009-09-24 14:49:33]

Additions:
CategoryDOM3API

Deletions:
~-bundesliga
CategoryDOM3API, Model Trains




Edited on 2011-09-27 19:47:18 by JoeSchmoe [link added]

Additions:
CategoryDOM3API, Model Trains

Deletions:
CategoryDOM3API



Edited on 2011-09-21 03:11:48 by Erikvarden06 [bundesliga]

Additions:
The DOM Level 3 API implements the W3C's DOM Level 3 XPath Specification, and the working group's note on XPath 2 support for it. It integrates tightly with Xerces-C, and provides access to XQilla's XPath 2 and XQuery functionality from the DOMXPathEvaluator class. The evaluate() method of this class returns void*, which can be cast to XPath2Result when using the XQilla DOM 3 API. To use the DOM 3 API, you will need to include the xqilla/xqilla-dom3.hpp header file - which will include all the headers you need to work with the DOM 3 API. The DOM3 API reference documentation is generated using Doxygen.
Some examples:
Doxygen generated documentation for the DOM 3 API can be found here.




Edited on 2005-12-20 13:06:25 by JohnSnelson

Additions:
CategoryDOM3API

Deletions:
CategoryDocumentation



Edited on 2005-12-20 13:03:27 by JohnSnelson

Additions:
Some examples:
#include <iostream>
#include <xercesc/dom/DOM.hpp>
#include <xqilla/xqilla-dom3.hpp>
XERCES_CPP_NAMESPACE_USE;
int main(int argc, char *argv[]) {
    // Initialise Xerces-C and XQilla using XQillaPlatformUtils
    XQillaPlatformUtils::initialize();
    // Get the XQilla DOMImplementation object
    DOMImplementation *xqillaImplementation =
        DOMImplementationRegistry::getDOMImplementation(X("XPath2 3.0"));
    // Create a DOMDocument
    DOMDocument* document = xqillaImplementation->createDocument();
    // Parse an XPath 2 expression
    const DOMXPathExpression *expression = document->createExpression(X("1 to 100"), 0);
    // Execute the query
    XPath2Result* result = (XPath2Result*)expression->evaluate(0, XPath2Result::ITERATOR_RESULT, 0);
    // Iterate over the results, printing them
    while(result->iterateNext()) {
        std::cout << UTF8(result->asString()) << std::endl;
    }
    // Clean up all the objects we have created
    result->release();
    ((const XQillaExpression*)expression)->release();
    delete document;
    // Terminate Xerces-C and XQilla using XQillaPlatformUtils
    XQillaPlatformUtils::terminate();
    return 0;
}




Edited on 2005-12-20 11:53:56 by JohnSnelson

Additions:
Basic code to use the DOM 3 API would look like this:

Deletions:
Basic code to use the simple API would look like this:



Edited on 2005-12-20 11:49:21 by JohnSnelson

Additions:
const DOMXPathExpression *expression = document->createExpression(X("1 to 100"), 0);
XPath2Result* result = (XPath2Result*)expression->evaluate(0, XPath2Result::ITERATOR_RESULT, 0);
Clean up all the objects we have created
result->release();
((const XQillaExpression*)expression)->release();
delete document;
Terminate Xerces-C and XQilla using XQillaPlatformUtils
XQillaPlatformUtils::terminate();
return 0;

Deletions:
const DOMXPathExpression *parsedExpression = document->createExpression(X("1 to 100"), 0);
XPath2Result* result = (XPath2Result*)parsedExpression->evaluate(0, XPath2Result::ITERATOR_RESULT, 0);




Edited on 2005-12-20 11:45:32 by JohnSnelson

Additions:
Basic code to use the simple API would look like this:
#include <iostream>
#include <xercesc/dom/DOM.hpp>
#include <xqilla/xqilla-dom3.hpp>
XERCES_CPP_NAMESPACE_USE;
int main(int argc, char *argv[]) {
    // Initialise Xerces-C and XQilla using XQillaPlatformUtils
    XQillaPlatformUtils::initialize();
    // Get the XQilla DOMImplementation object
    DOMImplementation *xqillaImplementation =
        DOMImplementationRegistry::getDOMImplementation(X("XPath2 3.0"));
    // Create a DOMDocument
    DOMDocument* document = xqillaImplementation->createDocument();
    // Parse an XPath 2 expression
    const DOMXPathExpression *parsedExpression = document->createExpression(X("1 to 100"), 0);
    // Execute the query
    XPath2Result* result = (XPath2Result*)parsedExpression->evaluate(0, XPath2Result::ITERATOR_RESULT, 0);
    // Iterate over the results, printing them
    while(result->iterateNext()) {
        std::cout << UTF8(result->asString()) << std::endl;
    }
}


Deletions:
~& We should add an inline example or two here.



Edited on 2005-12-16 09:08:03 by JohnSnelson

Additions:

CategoryDocumentation




Edited on 2005-12-16 09:03:27 by JohnSnelson

Additions:
The DOM Level 3 API implements the W3C's DOM Level 3 XPath Specification, and the working group's note on XPath 2 support for it. It intgrates tightly with Xerces-C, and provides access to XQilla's XPath 2 and XQuery functionality from the DOMXPathEvaluator class. The evaluate() method of this class returns void*, which can be cast to XPath2Result when using the XQilla DOM 3 API. To use the DOM 3 API, you will need to include the xqilla/xqilla-dom3.hpp header file - which will include all the headers you need to work with the DOM 3 API.
Doxygen generated documentation for the DOM 3 API can be found here.

Examples

Sample code for the DOM 3 API can be found at src/samples/basic/basicXQillaUsage.cpp.

The DOM Level 3 API implements the W3C's DOM Level 3 XPath Specification, and the working group's note on XPath 2 support for it.
Powered by Wikka Wakka Wiki 1.1.6.0
Page was generated in 1.7123 seconds