» XML Nodes added to alpha builds
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

XML Nodes added to alpha builds

Motivation & Concept

We added nodes that ease the creation and analyzation of xml documents.

Documents are represented by Elements and Attributes - not strings, which helps performance...
You now can easily get some parts of your document and route those as a spread of Elements to other parts of your patch, where they get further analyzed.
You always can convert an element to a simple string via AsString (Object) - or back to an element via AsElement (XML). But typically you only want to do that once: when reading from disk or writing to disk. For the rest working with Elements and Attributes is much more comfortable.

Joining & Splitting

There are nodes with which you can easily join & split XML-Elements (aka Tags) and Attributes: Element (XML Join), Element (XML Split), Attribute (XML Join), Attribute (XML Split).

Note that by concatinating several Element (XML Split) nodes - which also outputs an elements' child elements - will give you the possibility to dig into the xml structure. E.g. you could retrieve all child elements of an element, check its properties and dependant of some test select some of the childs via Select (Node). You therefore could patch a query into your xml structure...
However this can get complicated and so we added some more nodes:

Handy nodes for analyzing XML

With GetElements & GetAttributes we added different ways of searching for child tags and attributes.
When searching by name you get those that have a certain tag or attribute name and are direct child elements or attributes of the specified element.
do that with GetElements (XML ByName) & GetAttributes (XML ByName)

When searching by XPath you can express a more complex query that allows you dig deeper...
do it with GetElements (XML ByXPath) & GetAttributes (XML ByXPath)

While those nodes are flexible and spreadable in means of what you are searching for, they might be a bit unhandy when you already know that at a certain point in your patch only a certain tag with certain attributes are of interest.

For those cases we added Prune (XML) which lets you set those tag and attribute names statically in configuration pins with the bonus that you get friendly pin names and dont need to further process your attribute data.

For being really sure that your patch system can work with a certain xml-File or string you can check validity with IsValid (XML RelaxNG). link: RelaxNG
Both XML Syntax (.rng-Files) & Compact Syntax (.rnc-Files) are supported.

Sponsoring

Thanks to our MESO for putting those node on our agenda and for sponsoring.

gregsn, Tuesday, Aug 28th 2012 Digg | Tweet | Delicious 3 comments  
microdee 28/08/2012 - 00:49

haha coool! i've just started wrapping this kind of XML management a week ago in c# but this will make my life much easier then:D

sebl 28/08/2012 - 02:04

thanks a lot!

m4d 28/08/2012 - 17:39

bless devvvvs and meso!

  • 1

anonymous user login

Shoutbox

~16h ago

joreg: Don't forget: This months #vvvv meetup in #berlin is happening on the 27th: 12-berlin-vvvv-meetup

~16h ago

joreg: @u7 @CeeYaa, we're investigating this...

~18h ago

tonfilm: Under the hood: We switched from #SharpDX to #Xenko math. vl-switch-to-xenko-math VL vvvv #visualprogramming #dotnet #creativecoding

~23h ago

CeeYaa: haha it was frozen for 10 seconds when I send this Shout before - using Firefox

~23h ago

CeeYaa: hui really slow speed on MainPage, Contributions ... speed in Forum quite OK

~1d ago

u7angel: mmm, the site is really slow now.

~1d ago

joreg: PSA: and we're back!

~3d ago

joreg: PSA: Thursday night starting 11pm CET vvvv.org will move servers. If all goes well we should be back soon after.

~4d ago

joreg: But first: This Friday in Berlin: Join our full day "Getting started with Generative Design Algorithms" workshop https://nodeforum.org/announcements/workshop-getting-started-with-generative-design/

~4d ago

joreg: In #Linz for #ArsElectronica? Join us for a free 2 days #vvvv workshop sponsored by businesses/responsive-spaces-gmbh Apply here: 2-day-gamma-vvvvorkshop-at-responsive-spaces-in-linz