Question

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.

Was it helpful?

Solution

I am not an expert, but what I found out there numbered two options, essentially.

One, the pecl library that you are having trouble with.

Two, I found WBXML encoder and decoder classes in Horde of all places. They might give you a starting point, and since they are open source, they might meet your needs quite nicely. Here is a link where I found them.

http://phpxref.com/xref/horde/lib/XML/WBXML/index.html

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top