• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Two dashes, '--' in xml comments....

 
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Someone could help me.... In xml comments two dashes(--) are not allowed. For example, below documents is invalid because of '--' in the comments.
- <example>
- <test>
- <!-- Two dashes in - - comments make it invalid
-->
</test>
</example>

Could someone explain the reasons behind? I read on the net, "you can put anything in the comments, xml parser willn't parse, except two consecutive dashes, i.e. '--' "
Is there any way to escape them, so that my xml document will be valid..
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can defenetly say there is a way to do this -
- Change the XML Specs.
- Make all the "parser" vendors change their products.

That said, the reality is that this is part of the XML Specifications.
So, there is no way to make you XML file "valid" in the existing form.

- m
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic