• 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

XML and Entity reference

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am encountering the following problem:



My original XML document has the following text



<NM>The Fast & The Furious: Tokyo</NM>

After I parse and rewrite the document as an XML file, during the parsing from XML to DOM to XML the above gets changed to

<NM>The Fast & The Furious: Tokyo</NM>

Is there a way to specify that you want number entity reference instead of the character entity reference.

Thanks
Rupali
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could embed it in a CDATA section like this:

<NM><!CDATA[The Fast & The Furious: Tokyo]]></NM>
 
reply
    Bookmark Topic Watch Topic
  • New Topic