vMix Forums
»
General
»
General Discussion
»
XPath Node Vs Attribute as DataSource
Rank: Member
Groups: Registered
Joined: 12/15/2022(UTC) Posts: 11 Location: Minnsota
|
Is it possible to bring in a single XPath attribute rather than a node as a data source? I have an issue with the XML file/data I receive for a production that I think could be solved if my data source is only showing one attribute rather than an entire spreadsheet of various attributes under that node.
For example: XPath = //bsgame/team[1]/player/hitting (this brings in all baseball batting data attributes and works but not for my application since some needed attributes only display when there is a value - EX: there is no attribute for "strikeout" [@so] until someone actually strikes out so AUTO COLUMN will always find the wrong data field until it exists)
I need a working XPath with attribute: //bsgame/team[1]/player/hitting@so - returns ERROR: Object reference not set to an instance of an object.
My new idea is to have one attribute to display at a time in the data source so that I can lock it to the source rather than a column.
I have no control over the XML file and was told there can be no changes made to what I receive.
Is there a way to get just one attribute? Other ideas for a solution?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,216 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: ckshofner Is it possible to bring in a single XPath attribute rather than a node as a data source? I have an issue with the XML file/data I receive for a production that I think could be solved if my data source is only showing one attribute rather than an entire spreadsheet of various attributes under that node.
For example: XPath = //bsgame/team[1]/player/hitting (this brings in all baseball batting data attributes and works but not for my application since some needed attributes only display when there is a value - EX: there is no attribute for "strikeout" [@so] until someone actually strikes out so AUTO COLUMN will always find the wrong data field until it exists)
I need a working XPath with attribute: //bsgame/team[1]/player/hitting@so - returns ERROR: Object reference not set to an instance of an object.
My new idea is to have one attribute to display at a time in the data source so that I can lock it to the source rather than a column.
I have no control over the XML file and was told there can be no changes made to what I receive.
Is there a way to get just one attribute? Other ideas for a solution? if an attiribute is missing you will always get an erro in vMix ( datasources) One can however check an xpath in a script (see vb.net) and trap the "error" so one can decide what to do when the att is available or not https://www.w3schools.com/xml/xpath_syntax.asp
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,216 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
XPath Node Vs Attribute as DataSource
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close