Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
EnTerr
Level 9

Parsing <xml>text<node/></xml> ?

I still wonder if roXML can parse successfully XML that contains mixture of text and elements. (By "successfully" i mean parse returning result where parts of the document are not lost.) It was asked here viewtopic.php?f=34&t=66675#p427862 , i provided textbook examples and even a picture but that was not answered.

Maybe that was TL;DNR. Trying again with the simplest example i can muster - namely "<xml> text <node/> </xml>":
BrightScript Debugger> x = createObject("roXmlElement")
BrightScript Debugger> x.parse("<xml>text<node/></xml>")
BrightScript Debugger> ? x
<Component: roXMLElement>
BrightScript Debugger> ? x.getText()

BrightScript Debugger> ? x.genXml(false)
<xml><node /></xml>
BrightScript Debugger> ? x.getBody().count()
1
BrightScript Debugger> ? x.getBody()[0].genXml(false)
<node />

Where is my "text", how can i reach it?
0 Kudos
2 Replies
Highlighted
Roku Employee
Roku Employee

Re: Parsing <xml>text<node/></xml> ?

Its a bug, one of our engineers filed a bug on it for me, based on your previous thread. I don't know if it will ever be fixed, your best bet is to find a way to work around it.

- Joel
0 Kudos
Highlighted
EnTerr
Level 9

Re: Parsing <xml>text<node/></xml> ?

"RokuJoel" wrote:
Its a bug, one of our engineers filed a bug on it for me, based on your previous thread. I don't know if it will ever be fixed, your best bet is to find a way to work around it.

Thank you for the direct answer, RokuJoel!
Knowing that, i can figure how to proceed. There is no harm in admitting a quirk/peculiarity of a component - and mentioning the low probability of it being addressed also helps. Please do reply openly to other threads when there is a known issue/likely-outcome known.
0 Kudos