Hi there everyone. I am new to XML, and creating a web app for an academic project using Javascript and XML. A part of the project is to have HTML captioning with Quicktime video. An editor is to generate the XML data, and then Javascript handles the rest.
I am reading in an external XML file on the page load, and then turning the data into Javascript objects. One of the elements that I am reading is for a transcript, which may be displayed anywhere on the HTML page, and may contain HTML tags.
For example I can have multiple transcripts.
Code:
<transcript><![CDATA[This is some <b>bold</b> text.]]></transcript>
<transcript>...</transcript>
...
Then with Javascript I read in the text for the transcript elements into an array.
When i display the text somewhere.
Code:
document.getElementById('Caption').innerText = transcriptArray[tempCounter];
I get the whole text string, unrendered in HTML.
"This is some <b>bold</b> text"
I tried playing with an XSL template and creating an HTML namespace with no luck, but I don't think that is a solution since i am reading the XML into Javascript first, and then displaying the data in a regular HTML page.
If anyone has any suggestions or can point a finger in the right direction, it would be greatly appreciated.
Thanks