开发者

Developing Linux-compatible Command Line Utility under Mac OS X

which is the best way to develop a linux-compatible Command Line Utility under Mac OS X Lion? It should parse a really big XML file (up to 300 GB) - probably with libxml - and convert it to somewhat JSON.

With X开发者_StackOverflowCode 4 there is the possiblity to develop Command Line Utilities (former Foundation Tools I think). Are these compatible to run on Linux Servers? It would be nice, cause I'm used to Objective-C a little bit.

Another approach would be native C. But I'm really no expert in programming C. Alternatives are maybe Perl or Ruby. PHP as CLI script isn't as fast as needed I think.

Any suggestions which is the easiest and at the same time fastest in context of parsing the XML data way?

Thanks in advance Marco


With speed being a concern with files of that size, I'd be leaning toward C using libxml2 (available on both platforms) and use the progressive (event driven) interface. Other then that, if you stick to posix I/O, you should be fine.

Mac OS also includes a Python implementation. Python's readily available on Linux and has good libraries for both JSON and XML.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜