I've had a look at Kate, and at a test version of a commercial XML editor.
They seem OK at getting a pretty line-up of the elements, not that that's particularly difficult.
The problem I see is that they seem only to have text search and replace - I'd have thought that the whole point was to search and replace at the node level - a semantic search.
So they seem more like a plug-in to vi for appearance than an actual object editor.
I tried the python libraries. They have read-in alternatives of DOM and SAX. After that, they seem a bit basic. They seem to expect you to know the schema, or know which to choose from the various schemas.
I was expecting a bit more. Maybe I'm foolish, but I'd hoped to be able to:
- read into a DOM structure - print out the schema - a node tree - of something as common as a .svg file - do a search and replace on tags or objects
Something like: %s/<text>(.*)</text>/<a href:\1>&</a>/ But with some knowledge of the tags - the above is simply sed syntax.
I'm getting the strong feeling that where I started, with awk, might be the least inelegant place.
Unless, as is quite possible, I'm missing something fundamental.
When I use the python DOM, the underlying assumption seems to be that it's a fairly balanced and uniform tree, with a single root. An SVG file, though, has a preamble, then a whole series of nodes, at the same level as the preamble, so it's a much flatter structure. So looking for sub-nodes of the root and their siblings doesn't really work - well, it might, if there was a way to print out what it thinks the structure is to get an idea of the best way to navigate it.
The examples I've found make sense, but they're all based on much simpler and more regular structures than an svg file.
Inkscape offers some nice looking reflections and transformations of the diagram, but doesn't really seem helpful when it comes to attaching URLs or other actions in the CLI. Again, maybe I'm missing an obvious trick.
If I am missing some obvious tricks here, I'd be most grateful if somebody could point them out to me - or point me in the direction of something that addresses this.
On 2 March 2015 at 20:07, John Fisher <john.fisher@...3014...> wrote:
On 02/27/2015 09:42 PM, Peter Brooks wrote:
Thank you for the pointer to Kate. I'll look her up. What'd be really nice would be an XML extension to vi (vim)!
Kate has more programmer features than gedit, but might not be your cuppa since...
"vim" aha. we know who you are! (I work in a vi shop.)
sure there isn't one? ( an xml lib I mean)
I've never really got on with Eclipse. It may be a very different tool now, but when I last tried to use it was clumsy, slow, unintuitive and buggy.
not so buggy for me. otherwise yeah. I used it for Java ( also other Java IDEs I know) so either or both could have been clumsy. It is what it is.
-- John Fisher
Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user