• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 214
  • Last Modified:

XML: "&" behaves not as expected

Hi all...

We have an XML which contains the text "One word & another word".
It appears on the page as "One word&another word".

We already tried "One word & another word", the outcome again is "One word&another word".

The XML runs through a lot different scripts/packeges, not all done by us. I want to avoid to find the place where an interpreter has bug.

Question:
Any way to get the character "&" beside the "&"?

Thank you
0
Smoerble
Asked:
Smoerble
  • 4
  • 3
1 Solution
 
SmoerbleAuthor Commented:
increased to 250  (urgent)
0
 
SatanUKCommented:
try &

0
 
SatanUKCommented:
it sounds like a problem with the white space tho you may need to put a   or   so it reads

"One word & another word"
or
"One word & another word"
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
SmoerbleAuthor Commented:
Thanks for the answers...
it did not work, behaved as before...
increased to 500... hopefully there is any other way (beside including an image ;))
0
 
SatanUKCommented:
this worked fine for me

<?xml version="1.0" encoding="utf-8" ?>
<test>
      <test2>One word&#32;&#38;&#32;another word</test2>
</test>

do you have the utf-8 ?

does it matter if its Cdata or does it have to be PCData ?
0
 
SmoerbleAuthor Commented:
UTF-8: yes, we have.
CData/PCData? looking now into this.
0
 
SmoerbleAuthor Commented:
Ok, it was the CData thing:
<NavigationText><![CDATA[IT &amp; Productivity]]></NavigationText>

Thanks a lot, 500 points for Satan from UK ;)))
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now