Google Answers Logo
View Question
 
Q: How to get around a Reserved Word in XML? ( No Answer,   2 Comments )
Question  
Subject: How to get around a Reserved Word in XML?
Category: Computers > Programming
Asked by: leomis-ga
List Price: $2.00
Posted: 19 Sep 2005 15:45 PDT
Expires: 19 Oct 2005 15:45 PDT
Question ID: 569851
On one site, I am using a non-English (Armenian) characters in an XML
document. Everything is working fine, I have saved the XML document
with a ?UTF-8? encoding?I am having one tiny problem. The character
that represents the Sh sound, comes out as a ?>? and that character is
a reserved character in XML. How can I still show this character? The
lower case of that character is not having the problem, it?s just the
upper case. Is there a way to may be quote that so the XML code does
not take it as part of the code, and just handle it as a text
character?

Thanks

Request for Question Clarification by denco-ga on 19 Sep 2005 16:10 PDT
Howdy leomis-ga,

Would the following information help at all?

"Zvon Character Search"
http://www.zvon.org/other/charSearch/PHP/search.php?request=1351&searchType=2

"This material is based on Unicode Character Database and XML specification."

Thanks!  denco-ga - Google Answers Researcher

Clarification of Question by leomis-ga on 20 Sep 2005 11:11 PDT
Thank you for the response!

It still only shows a Box where the character is supposed to be.
See: http://caspianservices.net/box.jpg

To clarify exactly what I am doing...I am using a Flash PhotoGallery
Viewer that uses XML to grab the data. More info on the viwer:
http://www.airtightinteractive.com/simpleviewer/

Here is the actual line from the XML file:
<IMAGE><NAME>37.jpg</NAME><CAPTION><![CDATA[<font face="Aramian
Normal" size="16">&#1351;r=apatoua/ ir st;[/agor/ouj;an
;rkrpagoun;row7 H=mia/ni Ma3r :k;[;zi Tayar5 Fa3astan5 <font
face="Comic Sans MS">1986  &nbsp;&nbsp;</font><A href="images/37.jpg"
target="_blank"></font><font face="Comic Sans MS" size="16"><U>Click
here to view larger image.</U></A></font>]]></CAPTION></IMAGE>

Thanks.

Request for Question Clarification by denco-ga on 20 Sep 2005 11:49 PDT
What happens if you use the following instead?  Thanks!

<IMAGE><NAME>37.jpg</NAME><CAPTION><![CDATA[<font face="Aramian
Normal" size="16">&#x547;r=apatoua/ ir st;[/agor/ouj;an
;rkrpagoun;row7 H=mia/ni Ma3r :k;[;zi Tayar5 Fa3astan5 <font
face="Comic Sans MS">1986  &nbsp;&nbsp;</font><A href="images/37.jpg"
target="_blank"></font><font face="Comic Sans MS" size="16"><U>Click
here to view larger image.</U></A></font>]]></CAPTION></IMAGE>

Clarification of Question by leomis-ga on 20 Sep 2005 12:07 PDT
Same thing. I tried both.

Request for Question Clarification by denco-ga on 20 Sep 2005 17:37 PDT
OK, let's try something a bit different, please.  Thanks!

<IMAGE><NAME>37.jpg</NAME><CAPTION><![CDATA[<font face="Aramian
Normal" size="16">?;r=apatoua/ ir st;[/agor/ouj;an
;rkrpagoun;row7 H=mia/ni Ma3r :k;[;zi Tayar5 Fa3astan5 <font
face="Comic Sans MS">1986  &nbsp;&nbsp;</font><A href="images/37.jpg"
target="_blank"></font><font face="Comic Sans MS" size="16"><U>Click
here to view larger image.</U></A></font>]]></CAPTION></IMAGE>

Clarification of Question by leomis-ga on 21 Sep 2005 10:35 PDT
denco-ga,

That did not work. 

Thanks.

Clarification of Question by leomis-ga on 21 Sep 2005 10:38 PDT
Problem solved. See last post, at the bottom.
Answer  
There is no answer at this time.

Comments  
Subject: Re: How to get around a Reserved Word in XML?
From: fredericanand-ga on 21 Sep 2005 03:04 PDT
 
Hi

here is my answer.

You can use escape sequences (for example, specify "<" as "&lt;" and
">" as "&gt;"),
or you can make an entire script opaque <![CDATA[ ...]]> section.

Example::
<?xml version="1.0"?>
<welcome>Welcome &lt;  &gt; to XML.</welcome>

Regards
Frederic Anand
Subject: Re: How to get around a Reserved Word in XML?
From: leomis-ga on 21 Sep 2005 10:38 PDT
 
Frederic Anand,

That DID work. That is exactly what I was looking for.
I just used this "&lt;", and my "Aramian Normal" font converted that into ?.

Thanks for your help! :)

Leonard

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy