[sync] WBXML support.
Chuck Hagenbuch
chuck at horde.org
Thu Nov 6 21:00:35 PST 2003
Quoting Anthony Mills <amills at gascard.net>:
> Anyway, I will start converting my WBXML code into PHP. I am going to
> use Streams, because I think it is more elligant. Also, I am going to
> use a SAX like API. This has two advantages. One it does not require
> as much memory to run, can be faster, and I don't have to rewrite as
> much. Second, if done right, you can plugin WBXML and not have to
> change the SyncML code.
What do you mean by streams, in the context of PHP? Or do you just mean as a
design element.
> Here is how it works on my Java program.
> I check the header to see if it is wbxml encoded or not if it is I
> create a WBXML parser, else I create a default xml parser. The
> parsers(SAX) fires methods where it is appropriate. Because they are
> derived from the same base class, the syncml does not have to know about
> the encoding. I do the same for the output. If for one reason or
> another SAX will not work in PHP, you can trick it into using DOM or a
> full XML file.
That sounds fine, and like it'll integrate well into how rpc.php and the
Horde_RPC framework work - there's just selection of the backend based on the
content-type, and then calls a general process method.
Let me know if you have dev questions.
-chuck
--
Charles Hagenbuch, <chuck at horde.org>
"I am not that interested in green food." - Average Joe
More information about the sync
mailing list