You are not logged in.
Pages: 1
I have well over a hundred SVG files, from each of which I need to remove several path elements. The paths are named the same in all of the files, and I know SVG is XML-based, so I would think it should be fairly simple (for some values of simple). I've searched the Net, but I can't find anything already existing that's designed with this purpose in mind, and Inkscape doesn't support macros/batch jobs. I'm not terribly familiar with XML, but if anyone can even point me in the right direction, that would be a start.
Full disclosure: the paths in these SVGs are intended to be watermarks, from a trial version of some conversion software, which I found after hours of trying to find a way to view DWF files on Linux. If you think this is cheating, just don't help me.
-Jeffery
Offline
Maybe a simple sed command could do your work.
sed 's/old/new/g' inputFile > outputFile
new is a regular expression.
http://en.wikipedia.org/wiki/Sed
Ok, thats not XML based.
You could try this: http://en.wikipedia.org/wiki/Xslt
Last edited by Perry3D (2009-08-14 08:38:32)
Offline
...wow, I feel like an idiot. Not only did these folks not realize that watermarking a vector image is an annoyance at worst, but they also included the watermark code, very clearly, at the very beginning of the XML file. I didnt think it would be that easy, so I didn't bother checking. >_<
Well, that solves that...
-Jeffery
Offline
xmlstarlet can be used to edit xml files, too:
Offline
Pages: 1