diff --git a/samples/DOMPrint/DOMPrint.cpp b/samples/DOMPrint/DOMPrint.cpp
index 23655345585c401054812edbb0cbf707b1c3e168..7c86ef7d915d3c5fed8241824bd53527430cb888 100644
--- a/samples/DOMPrint/DOMPrint.cpp
+++ b/samples/DOMPrint/DOMPrint.cpp
@@ -98,8 +98,8 @@
 //        those types constants directly.
 // ---------------------------------------------------------------------------
 static const XMLCh  gEndElement[] = { chOpenAngle, chForwardSlash, chNull };
-static const XMLCh  gEndPI[] = { chQuestion, chCloseAngle, chSpace, chNull};
-static const XMLCh  gStartPI[] = { chOpenAngle, chQuestion, chSpace, chNull };
+static const XMLCh  gEndPI[] = { chQuestion, chCloseAngle, chNull};
+static const XMLCh  gStartPI[] = { chOpenAngle, chQuestion, chNull };
 static const XMLCh  gXMLDecl1[] =
 {
         chOpenAngle, chQuestion, chLatin_x, chLatin_m, chLatin_l
diff --git a/samples/SAXPrint/SAXPrintHandlers.cpp b/samples/SAXPrint/SAXPrintHandlers.cpp
index 5749e8a28f44f8c4a388ab0e758a9839318b0978..9805e6949cbe0b8d41bbeecc6c04ee1259ed6d87 100644
--- a/samples/SAXPrint/SAXPrintHandlers.cpp
+++ b/samples/SAXPrint/SAXPrintHandlers.cpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.10  2000/06/17 01:58:06  rahulj
+ * Now output the PI's with no space between ? and target.
+ *
  * Revision 1.9  2000/05/31 23:58:19  rahulj
  * Needed an explicit char* cast to get it working under Solaris.
  *
@@ -111,8 +114,8 @@
 //        those types constants directly.
 // ---------------------------------------------------------------------------
 static const XMLCh  gEndElement[] = { chOpenAngle, chForwardSlash, chNull };
-static const XMLCh  gEndPI[] = { chQuestion, chCloseAngle, chSpace };
-static const XMLCh  gStartPI[] = { chOpenAngle, chQuestion, chSpace };
+static const XMLCh  gEndPI[] = { chQuestion, chCloseAngle, chNull };
+static const XMLCh  gStartPI[] = { chOpenAngle, chQuestion, chNull };
 static const XMLCh  gXMLDecl1[] =
 {
         chOpenAngle, chQuestion, chLatin_x, chLatin_m, chLatin_l
@@ -125,7 +128,7 @@ static const XMLCh  gXMLDecl1[] =
 
 static const XMLCh  gXMLDecl2[] =
 {
-        chDoubleQuote, chSpace, chQuestion, chCloseAngle
+        chDoubleQuote, chQuestion, chCloseAngle
     ,   chCR, chLF, chNull
 };
 
@@ -171,6 +174,7 @@ void SAXPrintHandlers::writeChars(const XMLByte* const toWrite)
     // Quite annoying, considering every other platform printed
     // the string with the explicit cast to char* below.
     cout << (char *) toWrite;
+	cout.flush();
 }