[Xerte] Re: address CDATA?

Julian Tenney Julian.Tenney at nottingham.ac.uk
Mon Aug 15 11:32:50 BST 2011


String(your[0].expression[0].here);

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 12 August 2011 15:50
To: Xerte list
Subject: [Xerte] address CDATA?



Senior moment.


What's the syntax for addressing the CDATA content so it comes out as typeof = string?




<content>
<pages>
   <page id="1">
      <intro_text>
-                 <![CDATA[blah]]>
          </intro_text>






interfaceData = ifc.templateData.content[0];


debug(typeof interfaceData.pages[0].page[0].intro_text[0]);
//gives me "object"


How do I get at the string directly?
I know I could put it in a variable and re-type it, but I want to set text directly:


sometextid.setText(interfaceData.pages[0].page[0].intro_text[0]);
//displays undefined - because it's an object












-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20110815/d4dab3c8/attachment-0001.html>


More information about the Xerte mailing list