Solved

XML: "&" behaves not as expected

Posted on 2004-04-28
7
207 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
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!

 

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
A short article about problems I had with the new location API and permissions in Marshmallow
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Progress

690 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