Forum

Xml file creation using xml nodes

Hello evvvveryone,

I need to write an xml file from vvvv and i was considering to do it with the new xml nodes of vvvv.

Seems something doesn’t work properly with these nodes;
can you check the super simple attached patch and tell me if it works for you?
Maybe there’s something wrong in it?

thanks

Natan

xml test.v4p (3.4 kB)

it gives error on open:

vvvv.exe-exception-2012-09-25.log_.zip (5.6 kB)

thx. should be fixed in next alpha build (6234859bb596a7163ef86e9c9da5967370e21801).

tnx! i checked, it works perfectly.

One thing: is there a way to have control on the lines return?
(now the written xml is quite unreadable)
…like for example creating a new line every new element…

hm, looks fine to me:

xml_join.v4p (4.1 kB)

Ok, seems i found the bug:

the line return doesn’t work if there’s something written in the element’s value. it breaks for all the childs.

xml_join2.v4p (13.8 kB)

so the value of your root element is a string and some other elements? how about a different structure, putting the text in its own element? i think this would give your xml document a cleaner look and should solve your new line issue.

but thinking about it we should probably also provide some nodes to create comment and cdata nodes…

Ah so you wouldn’t use element’s value if it has children?
so if you need to give a value to the element you set an attribute for it.
it works but i’d like the idea of a simple value field already available as output in the Element (XML Split) node…

comment and cdata nodes would really provide more freedom and flexibility…

… no text …