Editing XML file

tschoepler's icon

Hey,

I am trying to write an XML–editor for Resolume Avenue. It is a VJ–app that stores the composition–data into an XML. suffix is .avc
The idea is to load a file and then tell which layers or clips you want to copy/move. Mainly because Avenue isn't able to copy&paste/move a clip from one deck to another (imagine decks as being tabs in firefox and layers&clips as content).
I already set up some jit.str.regexp to find the opening–tag and the closing–tag per clip. What I know want to do is copy the first and the last line and everything in between and delete/copy/move it and then save the .avc again (to a new file or what not I know how to achieve this).
My main problem:
I thought I could just count through the lines of the XML and then store them in a text–object. But by using the jit.tosymbol I loose all the quotation marks. On the other hand for now the jit.textfile won't do any good as it overrides its content whenever a new matrix arrives (which would be every new line following the opening–tag) but saves the quotation marks.
So what I really want is to "mark a portion of the xml–file then copy/delete/move it to a new line inside the same document and then save this file".
Any idea? ;) Thanks in advance

this is the patch so far. not that much so far. I had to learn these perl–REs first.
An example file of an Avenue composition can be found at the end.

Max Patch
Copy patch and select New From Clipboard in Max.

1040.demo.zip
zip