• 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

Invalid XML character

 
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am inserting an XML file into a database and then I am retrieving it later for display on a browser.
The problem is this:
When I retrieve the document from the database, I find that it has invalid XML characters in it.
Is there any way of ensuring that I remove the invalid character before I regenerate the XML document for display?
Thanks.
Mathew
 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you encode or escape those when you store in your database?
I think you should do it first.
--Zoe
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you identified the source of the characters? I recall one person had a problem with illegal characters that turned out to be 0x1A - the eof control code. If the XML is being processed by Word you might be getting those obnoxious "smart" quotes, etc.....
Bill
 
reply
    Bookmark Topic Watch Topic
  • New Topic