Skip to main content
August 26, 2010
Question

How to handle XML Special Characters?

  • August 26, 2010
  • 1 reply
  • 2016 views

I have some XML.  The apostrophe and dashes don't display.  Is there a way to handle it without resorting to & ?

It is the dash right after the underlined title.  For the apostrophe, I went ahead and used ITSD's (for ITSD's).  Just wondering if I have to that with every special character.

My XML:

<?xml version="1.0" encoding="utf-8" ?>
<content>
<Branch>
<EA><![CDATA[ <u>Enterprise Architecture (EA)</u> - is

responsible for developing and administering the information

and technical architectural areas of ITSD through the

establishment of reference models and processes needed to

identify ITSD&apos;s current technical infrastructure standards

and strategic direction. Consultation is available but is not

limited to the following areas:

<li> Assist with architect and design information models and

technology solutions for complex systems.</li>

<li> Evaluation, selection, and guiding implementation of

new technology.</li>

<li> Analyze and evaluate computer hardware and software

(computer platforms, networks, operating systems, control

systems, proprietary software packages, telecommunications

software and database management software and related

tools).</li>
<p></p>
<a href="http://cdphintranet/technology/ISO/pages/Home.aspx">

More Info..</a>

]]>
</EA>

</Branch>
</content>

code snippet:

myXML = new XML(e.target.data);
  trace(myXML);
  strTextBox="<body>";
  strTextBox+= myXML.Branch[0].EA;
  strTextBox+="</body>";
  myText.htmlText=strTextBox;

The display in the TextArea Component puts a little box in places where the dash and apostrophe are.

Thanks

This topic has been closed for replies.

1 reply

Inspiring
August 27, 2010

There is nothing wrong with what you do in XML. I don't think there is &apos; char in html.

August 31, 2010

Sorry...was out on furlough....

but MUST i use things like &apos; or is there a way that let's me just type the  '  instead?

Inspiring
August 31, 2010

Within CDATA block you can use ' directly. HTML char for quote is &rsquo;