amassari    2003/10/21 14:24:37

  Modified:    c/src/xercesc/com XMLDOMDocument.cpp
  Log:
  - if "load" is invoked with a relative path, and we are not inside IE, take the 
current directory as base path
  - when saving the document, we were saving just the last child of the DOM_Document, 
not all of them
  - replaced usage of _ftprintf with _fputts, or bad things would happen if the 
serialized text contained a format string like %f [bug 23640]
  
  Revision  Changes    Path
  1.3       +12 -4     xml-xerces/c/src/xercesc/com/XMLDOMDocument.cpp
  
  Index: XMLDOMDocument.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/com/XMLDOMDocument.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XMLDOMDocument.cpp        21 May 2002 19:53:53 -0000      1.2
  +++ XMLDOMDocument.cpp        21 Oct 2003 21:24:37 -0000      1.3
  @@ -967,6 +967,11 @@
                                }
                                m_FileName = baseURL + _T("/") + m_FileName;
                        }
  +                     else {
  +                             TCHAR szCurDir[MAX_PATH];
  +                             GetCurrentDirectory(MAX_PATH,szCurDir);
  +                             m_FileName=_bstr_t(szCurDir) + _T("\\") + m_FileName;
  +                     }
                }
        }
        else
  @@ -1466,7 +1471,9 @@
                int length = childs.getLength();
                for (int i=0; i < length; ++i) {
                        DOM_Node child = childs.item(i);
  -                     GetXML(child,text);
  +                     _bstr_t nodeText;
  +                     GetXML(child,nodeText);
  +                     text += nodeText;
                }
        }
        catch(DOM_DOMException& ex)
  @@ -1482,8 +1489,9 @@
        if ((fp = _tfopen(file, "wt")) == NULL) {
                return E_FAIL;
        }
  -     
  -     _ftprintf(fp, text);
  +
  +     if(text.length()>0)
  +             _fputts(text, fp);
        
        fclose(fp);
   
  
  
  

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

Reply via email to