I’ve been looking for a simple command line tool that allows some manipulation of XML files. Basically, what I need is a little program that allows me to print out some nodes, delete others, replace some more, and in general, have a good old time mangling XML files. The main reason is because one of the tools we use in our labs requires the use of a XML configuration file. If I want to run in a batch mode, I need a tool that lets me vary parameters easily and rerun the program with the changed parameters.
Enter xmlsnipe!
xmlsnipe is a little program that I’m writing that is a little like a sed clone for XML files. You may ask, why shouldn’t I just use SED, well, the answer is because that just wouldn’t be right. Also, I needed to sharpen up my coding skills. That being said, while it would be easy to write xmlsnipe in something that has support for XML, like Python, C#, or Java, I wanted to make it more difficult to write, and more primal. I’m writing it in C.
I’ve got it going okay so far. It’s already automakeized and what not. I must say that pkgconfig makes this much easier. Anyway, right now it can just delete and print nodes. I’m in the process of making it able to change values of nodes. Which is what I really needed it to do. Once that happens I’ll probably make a sourceforge page for the project and put a small release up on my projects page.