I am sure Oleg meant that you should use an approach that automaically
handles issues
like the special character encoding.
If you use the XmlDocument (XML DOM) you have just about no trouble with
that,
because the DOM does it for you.
Similary, if you read an XML document using XML DOM, the DOM will
appropriately decode the data you read.
If you on the other hand would use a pure text writer, like StreamWriter for
instance,
then you would have to take care of the character encoding issues yourself.
Sorry, I cannot understand your problem without more information.
--
Regards,
Dennis JD Myr�n
Oslo Kodebureau
"Bruno" <no@no.com> wrote in message
news:OR546FgCFHA.2032@tk2msftngp13.phx.gbl...
> but I'm using xmlDocument and xmlNode to create the nodes, I would need to
> change all my code and use xmlTextWriter?
>
> Bruno
>
> "Oleg Tkachenko [MVP]" <oleg@NO!SPAM!PLEASEtkachenko.com> wrote in message
> news:uzw9VsdCFHA.3740@TK2MSFTNGP09.phx.gbl...
>> Bruno wrote:
>>
>>> I have a code that generates a xml file and I have some texts that
>>> contains " ' < > etc....
>>>
>>> how do I encode these texts to have them showed with the characters < "
>>> ' / > etc...
>>
>> Why doesn't you code use standard XML API for creating XML? Just use
>> XmlTextWriter to create XML and don't bother about XML syntax
>> peculiarities - XmlTextWriter takes care.
>>
>> --
>> Oleg Tkachenko [XML MVP, MCP]
>> http://blog.tkachenko.com
>
>