diff --git a/src/dom/AttrNSImpl.cpp b/src/dom/AttrNSImpl.cpp
index 5106ae9861858b1cf0fec942946f2e53d954995e..84134b720b589dc9a3ec6fed1303cf14c0f35c35 100644
--- a/src/dom/AttrNSImpl.cpp
+++ b/src/dom/AttrNSImpl.cpp
@@ -159,7 +159,7 @@ void AttrNSImpl::setPrefix(const DOMString &prefix)
         prefix.equals(xmlns) && !namespaceURI.equals(xmlnsURI))
         throw DOM_DOMException(DOM_DOMException::NAMESPACE_ERR, null);
 
-    XMLCh *p = prefix.rawBuffer();
+    const XMLCh *p = prefix.rawBuffer();
     for (int i = prefix.length(); --i >= 0;)
         if (*p++ == chColon)	//prefix is malformed
             throw DOM_DOMException(DOM_DOMException::NAMESPACE_ERR, null);
diff --git a/src/dom/DOMString.cpp b/src/dom/DOMString.cpp
index fcbce52fe79775bb8b5c624a5971471237bb75e4..4b39f98f143a9156c1374c1c86eed0e308d15e74 100644
--- a/src/dom/DOMString.cpp
+++ b/src/dom/DOMString.cpp
@@ -56,6 +56,10 @@
 
 /*
  * $Log$
+ * Revision 1.17  2000/06/02 00:45:42  andyh
+ * DOM Fixes:  DOMString::rawBuffer() now returns a const XMLCh * pointer.
+ * Two plain deletes changed to array deletes.
+ *
  * Revision 1.16  2000/05/09 00:22:29  andyh
  * Memory Cleanup.  XMLPlatformUtils::Terminate() deletes all lazily
  * allocated memory; memory leak checking tools will no longer report
@@ -168,7 +172,7 @@ void DOMStringData::removeRef()
     {
         fBufferLength = 0xcccc;
         fRefCount     = 0xcccc;
-        delete this;
+        delete [] this;  //  was allocated with new char[size] !
         XMLPlatformUtils::atomicDecrement(DOMString::gLiveStringDataCount);
     };
 };
@@ -982,7 +986,7 @@ void DOMString::println() const
 
 
 
-XMLCh *DOMString::rawBuffer() const
+const XMLCh *DOMString::rawBuffer() const
 {
     XMLCh  *retP = 0;
     if (fHandle)
diff --git a/src/dom/DOMString.hpp b/src/dom/DOMString.hpp
index 3abedee1ceee3d0624f2cda51ef8db8417457515..9b72af8e6173d7783eacd1b8a04121da93545631 100644
--- a/src/dom/DOMString.hpp
+++ b/src/dom/DOMString.hpp
@@ -56,6 +56,10 @@
 
 /*
  * $Log$
+ * Revision 1.12  2000/06/02 00:45:42  andyh
+ * DOM Fixes:  DOMString::rawBuffer() now returns a const XMLCh * pointer.
+ * Two plain deletes changed to array deletes.
+ *
  * Revision 1.11  2000/03/02 19:53:52  roddey
  * This checkin includes many changes done while waiting for the
  * 1.1.0 code to be finished. I can't list them all here, but a list is
@@ -359,7 +363,7 @@ public:
       *         a null being there, and do not add one, as several DOMStrings
       *         with different lengths may share the same raw buffer.
       */
-    XMLCh       *rawBuffer() const;
+    const XMLCh *rawBuffer() const;
 
     /**
       * Returns a copy of the string, transcoded to the local code page. The
diff --git a/src/dom/DStringPool.cpp b/src/dom/DStringPool.cpp
index 833302ba558584109024dcadd5d3eae19f295300..82b8064bb6d1a818a0a66d68196b6b6103b8ed60 100644
--- a/src/dom/DStringPool.cpp
+++ b/src/dom/DStringPool.cpp
@@ -56,6 +56,10 @@
 
 /*
  * $Log$
+ * Revision 1.5  2000/06/02 00:45:42  andyh
+ * DOM Fixes:  DOMString::rawBuffer() now returns a const XMLCh * pointer.
+ * Two plain deletes changed to array deletes.
+ *
  * Revision 1.4  2000/05/09 00:22:31  andyh
  * Memory Cleanup.  XMLPlatformUtils::Terminate() deletes all lazily
  * allocated memory; memory leak checking tools will no longer report
@@ -128,7 +132,7 @@ DStringPool::~DStringPool()
                            //   on spe->fString.
         }
     }
-    delete fHashTable;
+    delete [] fHashTable;
     fHashTable = 0;
 };
 
@@ -158,9 +162,9 @@ const DOMString &DStringPool::getPooledString(const DOMString &in)
     DStringPoolEntry    **pspe;
     DStringPoolEntry    *spe;
 
-    XMLCh *inCharData = in.rawBuffer();
-    int    inLength   = in.length();
-    int    inHash     = XMLString::hashN(inCharData, inLength, fHashTableSize);
+    const XMLCh *inCharData = in.rawBuffer();
+    int          inLength   = in.length();
+    int          inHash     = XMLString::hashN(inCharData, inLength, fHashTableSize);
 
     pspe = &fHashTable[inHash];
     while (*pspe != 0)
diff --git a/src/dom/DocumentImpl.cpp b/src/dom/DocumentImpl.cpp
index efca2a4a8c6bc86fc16550e808847b242595c9de..99182396d7b1316fbed31a864b07488ef6b6cc06 100644
--- a/src/dom/DocumentImpl.cpp
+++ b/src/dom/DocumentImpl.cpp
@@ -423,9 +423,9 @@ NodeImpl *DocumentImpl::insertBefore(NodeImpl *newChild, NodeImpl *refChild)
 
 bool DocumentImpl::isXMLName(const DOMString &s)
 {
-    XMLCh       *nam;
-    int         length;
-    int         i;
+    const XMLCh   *nam;
+    int           length;
+    int           i;
 
     length = s.length();
     if (length == 0)
@@ -673,7 +673,7 @@ ElementImpl *DocumentImpl::getElementById(const DOMString &elementId)
 int DocumentImpl::indexofQualifiedName(const DOMString & qName)
 {
     //Check if s = prefix:localName, name or malformed
-    XMLCh *qNameP = qName.rawBuffer();
+    const XMLCh *qNameP = qName.rawBuffer();
     int qNameLen = qName.length();	//note: qName[qNameLen] may not be 0
     int index = -1, count = 0;
     for (int i = 0; i < qNameLen; ++i)
diff --git a/src/dom/ElementNSImpl.cpp b/src/dom/ElementNSImpl.cpp
index 9cb9e200038f61128350f1614fe295fa31e3192c..f79530f155c10d3696f6201e3b3145c4c17ef631 100644
--- a/src/dom/ElementNSImpl.cpp
+++ b/src/dom/ElementNSImpl.cpp
@@ -153,7 +153,7 @@ void ElementNSImpl::setPrefix(const DOMString &prefix)
     if (prefix.equals(xml) && !namespaceURI.equals(xmlURI))
         throw DOM_DOMException(DOM_DOMException::NAMESPACE_ERR, null);
 
-    XMLCh *p = prefix.rawBuffer();
+    const XMLCh *p = prefix.rawBuffer();
     for (int i = prefix.length(); --i >= 0;)
         if (*p++ == chColon)	//prefix is malformed
             throw DOM_DOMException(DOM_DOMException::NAMESPACE_ERR, null);