views:

74

answers:

2

Is there a native PHP wbxml API that can be used platform-independently? Perhaps a loadable module?

I have seen the pecl implementations but I have not been able to successfully work with the builds on win32 platforms.

A: 

I don't know a huge amount about WBXML, but from what I can gather it's a binary-formatted XML file. I suppose at the simplest you could use the XML modules such as simpleXML to generate your XML document, output it as a string and then use PHP's built in file handling functions (fopen, fwrite, etc) to dump the string as binary data to a file. To reverse the process load the file as a string and have SimpleXML parse it.

However, without knowing the specific details of the WBXML format, I'm sure there's more to it tan that. You'd also have to implement the necessary code yourself, but as you could implement it in PHP itself that should make cross-platform portability a bit simpler to accomplish.

Not really an answer as such, I'm afraid, but I hope it gets you going in the right direction.

Gordon
I understand - thanks for the suggestions. It's just that I wouldn't need to write my own library if there's one available.
Olaseni