Just an observation, but it has taken me some time to resolve this.  I think
this is also a fairly common problem with many other people failing to
handle the escape characters (and not even knowing about them).

Is there any reason why the DOMPrint example does not convert all the
standard escape characters by default?

If not, would it be possible to modify that program so that the text node
uses StdEscapes rather than CharEscapes?

Nick


//
---------------------------------------------------------------------------
//  ostream << DOM_Node   
//
//  Stream out a DOM node, and, recursively, all of its children. This
//  function is the heart of writing a DOM tree out as XML source. Give it
//  a document node and it will do the whole thing.
//
---------------------------------------------------------------------------
ostream& operator<<(ostream& target, DOM_Node& toWrite)
{
    // Get the name and value out for convenience
    DOMString   nodeName = toWrite.getNodeName();
    DOMString   nodeValue = toWrite.getNodeValue();
    unsigned long lent = nodeValue.length();

    switch (toWrite.getNodeType())
    {
        case DOM_Node::TEXT_NODE:
        {
            gFormatter->formatBuf(nodeValue.rawBuffer(),
                                  lent, XMLFormatter::StdEscapes);
//XMLFormatter::CharEscapes);
            break;
        }



************************************************************************* 
This message contains privileged and confidential information intended 
only for the use of the recipient named above. Its contents do not 
constitute a commitment by Strategic Thought Limited ("Strategic 
Thought") unless separately endorsed by an authorised representative 
of Strategic Thought. 
 
Any use, dissemination, distribution, reproduction or unauthorised 
disclosure of this message is prohibited. If you receive this message 
in error, please notify the sender immediately and delete it from your 
computer systems. 
 
Any views expressed in this message are those of the individual sender 
and may not necessarily reflect those of Strategic Thought. 
 
Strategic Thought believes this e-mail and any attachments to be virus 
free. However, the recipient is responsible for ensuring it is virus 
free and Strategic Thought do not accept any responsibility for any 
loss or damage howsoever caused from use of this e-mail, attachments 
or contents. 
************************************************************************* 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to