File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is forward slash / a reserverd character?

 
Phil Weinstein
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is forward slash / a reserverd character in xml? If so what is the escape sequence i.e. > for >.
Many Thanks
 
Hari Vignesh Padmanaban
Ranch Hand
Posts: 578
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi pin an xml file. hil,
As far as I know you can use both "/" and ">" as the co ntent of an elemnt
Even though ">" can be used as it is, it is better to put it as an entity. But for "<" you would have to use an entity!!.
For some reason when I type in the entity it gets converted into teh corresponding character!!. I tried thrice
Please refer to teh follwing link for a detailed info on entities !!!
http://tech.irt.org/articles/js212/#intro
So all the following are right

Hope thsi helps
hari
[ January 10, 2004: Message edited by: Hari Vignesh Padmanaban ]
[ January 10, 2004: Message edited by: Hari Vignesh Padmanaban ]
[ January 10, 2004: Message edited by: Hari Vignesh Padmanaban ]
[ January 10, 2004: Message edited by: Hari Vignesh Padmanaban ]
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For some reason when I type in the entity it gets converted into teh corresponding character!!. I tried thrice

Yeah, it's a bit difficult. But there's really no other way to prevent "malicious HTML scripting" but to encode all special characters that might affect how the page layout comes out...
In case someone is interested, here are some examples of how you post stuff with special characters etc:
UBB blocks:
[CODE]foobar[/CODE] is written as &#91;CODE&#93;foobar&#91;/CODE&#93;
XML/HTML snippets:
<xml version="1.0"?> is written as &lt;xml version="1.0"?&gt;
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic