Revolution 2.0; XML Pull Parser?

Mark Brownell gizmotron at earthlink.net
Fri Jan 10 09:48:01 EST 2003


Hi,

I have a question about the method used to parse XML with Revolution 2.0.

Many of the XML parsers available for building applications are based on a
push technique that gathers all the information found in a well-formed XML
document and places it in some kind of nested array. The latest efforts in
XML coming from the DBMS crowd of XML users is to go beyond push parsers and
query the XML before populating any database with information that the pull
parser technique might gather. They have moved towards an SQL-XML kind of a
procedure.

I don't have a copy of the Revolution 2.0 alpha. I have know idea what its
capabilities might be. If it could just handle one simple pull parsing
capability then I could build my own SQL-XML parser.

I wish something like this were possible:

Have the pull parser algorithm query any XML element for two other elements
that exist inside the first element. Have that parser include only the
selected items that fit the query into an accessible array.

----------------------------------
Example code might look like this:

XML is a representation of a database table nested in "<table>", "<row>"
configuration.

put "<row>" into dbtableRow

put "<reference>" into infoReference
-- refers to the reference number of each row/transaction in record

put "<purchased>" into dataToFind
-- refers to what each customer purchased

So with these variables the pull parser could do this:

put the text of field "xml document" into parseThis

put findAll(parseThis, dbtableRow (infoReference, dataToFind)) into
pullParserArray
----------------------------------

With this kind of function built into the new Revolution 2.0 there would be
a definite advantage over other RAD tools trying to compete with it. Already
this kind of capability is becoming available to the .Net developers and
custom DBMS types that build classes to support it in other languages. I'm
hoping something like this was or will be considered before the full release
of Revolution 2.0.

Thanks for any information on this,
Mark Brownell














More information about the use-livecode mailing list