Hello Ventuzians!
THE FORUMS ARE CLOSED!

Please join our discord server HERE!! << click me :D

We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server

Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!

Different .xml

Q and A about functionality and how to solve a special task for your application.

Moderator: Support

Post Reply
prod191

Different .xml

Post by prod191 » 17 Apr 2014, 12:27

Hey folks,

i used to read the help file and the interactive example cause of figure out how to
read out my .xml file.

in your example it looks like this :

xml file : XML Help File
x path expr 1 : /Products/Product//Notes[3]
x path expr 2 : count(/Products/Product/Version/Notes)

The structure of your xml File looks like :

<?xml version="1.0"?>
<?xml-stylesheet type='text/xsl' href='ReleaseNotes.xslt'?>
<Products>
<Product Name="Ventuz Designer">
<Version Value="1.0 Final Release">
<Notes>Stepping through</Notes>
<Notes>an XML file</Notes>
<Notes>reading line by line</Notes>
<Notes>and printing text</Notes>
<Notes>on the screen.</Notes>
</Version>
</Product>
</Products>


Now i´m trying to read out a different .xml File and the way i try is not working. maybe because the script looks different.

my xml file:

<seqCue name="Cue 2" itime="66:0" iwait="0:0" intId="2" mode="1" jGoal="0:0" jCt="0" rtch="false" />
<seqCue name="Cue 4" itime="76:1" iwait="0:0" intId="4" mode="4" jGoal="10:0" jCt="0" rtch="false" />
xml file test_1
x path expr. 1 ......
x path expr. 2 count.....
(i think i´ll need the count to step next and next etc. but how if i dont know how many "Cue´s" there will be?)

it´s a .xml file generated from another program which runs the show.
i´m just trying to read the "Cue-Names" in this Case "Cue 2" if i klick next it will display "Cue 4" etc. etc.
in the end there will be maybe 20-40 cue´s, it depends on the running show.

For now i have no idea how to solve this problem..

It would be great if you could help me with this task..

User avatar
Götz_B
Posts: 180
Joined: 21 May 2013, 13:01

Re: Different .xml

Post by Götz_B » 17 Apr 2014, 15:52

Hi,

first you need a matching expression to get the desired attribute - in your case cue names.
Its pretty easy, just get in touch with XPath Expression a bit.

//seqCue[1]/@name
gives you the value of the attribute called name of the first element called seqCue - Cue 2

To step through the elements you fill the number between the brakets dynamically as in the interactive example.

The Counter Node gives the numbers and the ConvertToText Node puts the number in the expression.

The second XPath Expression in the example is used for knowing how many elements there are.

count(//seqCue)

Cheers,

Götz

Post Reply