MediaSignage support forum

community support => Studio (Legacy / SignStudio) => Topic started by: byoung on August 29, 2021, 10:51:29 PM

Title: xml data won't display
Post by: byoung on August 29, 2021, 10:51:29 PM
I am creating a weather scene using xml items and xml players, similar to the video tutorial example. The problem is I can't get the temperature ("air_temp") data to display, not even in the Studio.

Here is the web xml file I'm using - it is auto-generated from the government website --- {colon} inserted because outside urls not permitted
https{colon}//dd.meteo.gc.ca/observations/swob-ml/latest/CYKA-AUTO-swob.xml

The Items Path I'm using in the XML Players scene is:
om:member.om:Observation.om:result.elements.element.(@name==“air_temp”)

and in the XML items scene, the Field Name is:
@value.

I've tinkered around and was able to get other data to display but the temperature won't.

I talked to the chat team about this on Friday and they said, " The xml file that you have is complicated to load with the xml component. If it was a simpler xml file we would be able to read the values and output it", but like I said, I am able to get some data to show from it so I think it should work.

Any help is appreciated. Thanks.



Title: Re: xml data won't display
Post by: admin on August 31, 2021, 12:18:40 AM
I am creating a weather scene using xml items and xml players, similar to the video tutorial example. The problem is I can't get the temperature ("air_temp") data to display, not even in the Studio.

Here is the web xml file I'm using - it is auto-generated from the government website --- {colon} inserted because outside urls not permitted
https{colon}//dd.meteo.gc.ca/observations/swob-ml/latest/CYKA-AUTO-swob.xml

The Items Path I'm using in the XML Players scene is:
om:member.om:Observation.om:result.elements.element.(@name==“air_temp”)

and in the XML items scene, the Field Name is:
@value.

I've tinkered around and was able to get other data to display but the temperature won't.

I talked to the chat team about this on Friday and they said, " The xml file that you have is complicated to load with the xml component. If it was a simpler xml file we would be able to read the values and output it", but like I said, I am able to get some data to show from it so I think it should work.

Any help is appreciated. Thanks.

note the difference between attributes and elements. in your XML, values as attribute field. we are not able to read data in such form. if it were in the form below:

<element name="air_temp" >
  <value>100.0</value>
</element>

then you would only need to specify the field "value"


best regards

-ADMIN
Title: Re: xml data won't display
Post by: byoung on August 31, 2021, 04:38:24 AM
Thanks for the reply, but is this answer true?
Isn't this how it is done in the xml video tutorial?

For example, in the tutorial, the xml items are specified by their attributes (@name, @price, @resource), and in the food menu scene the xml player calls the burger by it's attribute name (Burger.(@name=="ChickenBurger")

Isn't this the same?
Thanks for your time.
Title: Re: xml data won't display
Post by: admin on August 31, 2021, 09:58:23 AM
note that difference between structures: in the food menu, fields are placed as attribuites:

Code: [Select]
<Burger size="" name="" oz="" price="" ></Burger>

in your XML the attributes are not consistent the same and if follows another element calLed "qualifier".  also note that there are fields called "value" in both "element" and "qualifier" elements:

Code: [Select]
<element name="pres_tend_amt_pst3hrs" uom="hPa" value="MSNG">
  <qualifier name="qa_summary" uom="unitless" value="-1"/>
</element>
<element code-src="std_code_src" code-type="tendency_characteristic" name="pres_tend_char_pst3hrs" uom="code" value="MSNG">
  <qualifier name="qa_summary" uom="unitless" value="-1"/>
</element>
Title: Re: xml data won't display
Post by: byoung on August 31, 2021, 10:20:48 PM
Thank you for your descriptive explanation. I understand now. I'll find another source. Thanks again!