This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes copy right and trade mark Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "copy right and trade mark " Watch "copy right and trade mark " New topic

copy right and trade mark

Mary Cole
Ranch Hand

Joined: Dec 02, 2000
Posts: 362
Hi all,

I have a UTF-8 DB and i have stored copy right and trade mark symbol in DB.
How can I build the XMl from the data which contains these charactes
WHat is the equivalent of copy right and trade mark in XML
James Swan
Ranch Hand

Joined: Jun 26, 2001
Posts: 403
copyright is: &-#169;
registered tm is: &-#174;
(note remove the "-")
Not a flash solution by any means, but what I've generally done in the past is just "clean" these special characters before building the xml.
read the value from your DB
scan for special characters
replace them with escaped version.
Mary Cole
Ranch Hand

Joined: Dec 02, 2000
Posts: 362
Hey James,
Thx for the reply,
Can you pls tell me what all the spl characters I need to take care of b4 I build the XML.
Pls note ....I need to take care of multilingual data as my DB is UTF-8
jason adam
Chicken Farmer ()
Ranch Hand

Joined: May 08, 2001
Posts: 1932
There are several lists that give character-to-entity listings, here are a couple:
A search on UTF-8 characters in XML, or special UFT-8 characters in HTML yielded a whole slew of results.
It is sorta covered in the JavaRanch Style Guide.
subject: copy right and trade mark
jQuery in Action, 3rd edition