There are several weird structures which are pretty bad to interpret with common XML Parsers. Since XML is a very flexible format for storing data it makes sense to use it, especially when we are planning to provide different interfaces for vvvv patches. These intefaces could/should be able to process the XML Tree easily. This is't provided right now. Here are my hints:
here is what i think:
{CODE(ln=>1)} <PATCH nodename="something.v4p">
<NODE id="2" nodename="IoBox (String)"> <BOUNDS height="" left="" top="" type="" width="" /> <LINK dstnodeid="" dstpinname="" hiddenwhenlocked="" srcnodeid="" srcpinname="" /> <PIN pinname="" slicecount=""> <SLICE>content of slice 0</SLICE> <SLICE>content of slice 1</SLICE> <SLICE>content of slice 2</SLICE> </PIN> </NODE> </PATCH>^
for conversion with old releases there would be a need of a converter. which should not be a problem because that would be just the processing of the xml as it is right now into the new format.
Saving a patch wich includes a binary byte string (e.g in a IOBox) causes vvvv to reject the patch when trying to reopen it. This is no good. The problem: XML is not made for storing binary data. There is a common workaround though: encode the strings as a base64 byte stream. when open a patch recover that stream to its original byte stream.
See:http://www.flipcode.com/cgi-bin/fcarticles.cgi?show=64114http://www.xml.com/pub/a/98/07/binary/binary.html
i´d suggest different encodings -- as base64 might be cool for embedding jpgs, for normal text strings it would be great if they are somehow readable in the xml source file
but aren´t cdata sections for storing 8bit data?
That was my thought too. But how to differ between different string types? Example: We have two IOBoxes: one with the string "hello world" the other with a binary data (e.g. a jpeg file). how should vvvv know which encoding it has to use? same problem with loading a patch!
either just check it or encode just the characters which are not valid within xml (should be 98% of all 8bit chars anyway) -oschatz
anonymous user login
~2d ago
~2d ago
~2d ago
~4d ago
~15d ago
~24d ago
~29d ago
~1mth ago
~1mth ago
~1mth ago