[sword-devel] modules to relational database
Troy A. Griffitts
scribe at crosswire.org
Tue Nov 7 10:31:16 MST 2006
Martin Gruner wrote:
> I find that a database would be a very
> fast and convenient way to represent the tree structure of an xml document.
> Better than Sword does at the moment.
Martin, not to be rude, but have you actually personally used SWORD to
display a tree structure? Have you attempted to represent a tree
structure in a RDBMS? I'm not saying it can't be done. I'll just post
the SWORD API exposed for this purpose, and let you and others decide if
it is more convenient than SQL. From treekey.h
(http://crosswire.org/svn/sword/trunk/include/treekey.h):
/** Go to the root node
*/
virtual void root() = 0;
/** Go to the parent of the current node
* @return success or failure
*/
virtual bool parent() = 0;
/** Go to the first child of the current node
* @return success or failure
*/
virtual bool firstChild() = 0;
/** Go to the next sibling of the current node
* @return success or failure
*/
virtual bool nextSibling() = 0;
/** Go to the previous sibling of the current node
* @return success or failure
*/
virtual bool previousSibling() = 0;
/** Does the current node have children?
* @return whether or not it does
*/
virtual bool hasChildren() = 0;
virtual void append() = 0;
virtual void appendChild() = 0;
virtual void insertBefore() = 0;
>
> mg
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
More information about the sword-devel
mailing list