Blog Archives

awk: splitting an XML file into coherent pieces

So i have this huge XML file that needs to be split in small pieces. But the files should contain coherent messages like: <MSG> … </MSG> I found the following command to split the file, the root tag for the

Tagged with:
Posted in Code

Feeding NSXMLParser a stream of xml

NSXMLParser is a great parser, but what if you are reading XML from, say a socket. You may not have the complete message right away, and there may be multiple root tags (or you can close and open a socket

Tagged with: , , ,
Posted in Code