Solved

XML: "&" behaves not as expected

Posted on 2004-04-28
7
206 Views
Last Modified: 2010-04-17
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
Comment
Question by:Smoerble
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 

Author Comment

by:Smoerble
ID: 10938412
increased to 250  (urgent)
0
 
LVL 2

Expert Comment

by:SatanUK
ID: 10938544
try &

0
 
LVL 2

Expert Comment

by:SatanUK
ID: 10938583
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Smoerble
ID: 10938872
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
 
LVL 2

Accepted Solution

by:
SatanUK earned 500 total points
ID: 10938934
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
 

Author Comment

by:Smoerble
ID: 10938972
UTF-8: yes, we have.
CData/PCData? looking now into this.
0
 

Author Comment

by:Smoerble
ID: 10975569
Ok, it was the CData thing:
<NavigationText><![CDATA[IT &amp; Productivity]]></NavigationText>

Thanks a lot, 500 points for Satan from UK ;)))
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question