kugo | 7 years ago | 6 comments | 1.4K views
I'm struggling with the proper syntax to instruct BT to parse certain xml data in the format I have uploaded here.
I would like to pass, for example, the unique EventNames, StageNames and BandNames and such elements from my example xml file to the associated text layers in the BT show also provided.
I'm not wanting to loop through them. I just want to display them as a list of events.
The xml is not necessarily "nested" as in the example xml here outerspace-software.com... so I'm not sure how to do this as there are no examples supporting this type of xml format.
When you save your XML as:
d:\temp\musicfest_showtimes.xml
And paste this text in the textbox of text layer:
xml:d:\temp\musicfest_showtimes.xml?xml/MusicEvents/Event/Stage/Band.BandName[1]
The following text is displayed:
Mindless
I don't believe there's an instruction to list all band names. I think I would write a script, like a PHP file, that reads the XML and outputs a new XML with an AllBandNames node.
michiel, 7 years ago
When you paste this in the textbox of a scroller layer, all band names are displayed:
xml:d:\Temp\musicfest_showtimes.xml?xml/MusicEvents/Event/Stage/Band.BandName
michiel, 7 years ago
Thank you Michiel, for your suggestions and examples . This is very helpful.
Do you know if there is a way to parse the element from specific parent nodes?
For example (I know this doesn't work) but something like this...
xml:d:\temp\musicfest_showtimes.xml?xml/MusicEvents/Event.EventName[1]/Stage.StageName[0]/Band.BandName[1]
Text displayed:
Fields of Fashion
I realize know, as you suggested, I can use the following [0],[1],[2],[3] etc calling them in relation to entire database but would be
nice to be able to parse certain elements by their parent node/s.
Otherwise would this require the XML document to have a more "nested" structure similar to the example screenshot below....?
kugo, 7 years ago
To keep it simple, I would make sure every event has the same number of stages and bands. If the band is not used I would add an empty node.
In case you are not the author of the XML, you could create a script (like a PHP file) to parse the XML and convert it to the format your BluffTitler show expects.
michiel, 7 years ago
Thank you Michiel,
I like your suggestion to create empty nodes for the band names to avoid issues.
However, it looks like converting to a more friendly xml format in the near future is my best choice.
I guess the only other solution is to add support for xquery in BT. I'm sure you can handle this with
all the extra time you have right?.... You're not a very busy man are you :)
It's already great enough that BT supports xml data and I will compromise and make it work.
Keep up the great work!
kugo, 7 years ago