2 * Copyright 1999-2000,2004 The Apache Software Foundation.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 * Revision 1.1 2004/11/23 13:38:52 lpadovan
20 * * basic infrastructure for collecting statistics
22 * Revision 1.4 2004/09/08 13:55:33 peiyongz
23 * Apache License Version 2.0
25 * Revision 1.3 2003/05/30 09:36:36 gareth
26 * Use new macros for iostream.h and std:: issues.
28 * Revision 1.2 2003/02/05 18:53:23 tng
29 * [Bug 11915] Utility for freeing memory.
31 * Revision 1.1 2000/08/02 19:16:14 jpolast
32 * initial checkin of SAX2Print
37 // ---------------------------------------------------------------------------
38 // Includes for all the program files to see
39 // ---------------------------------------------------------------------------
41 #if defined(XERCES_NEW_IOSTREAMS)
47 #include "SAX2PrintHandlers.hpp"
50 // ---------------------------------------------------------------------------
51 // This is a simple class that lets us do easy (though not terribly efficient)
52 // trancoding of XMLCh data to local code page for display.
53 // ---------------------------------------------------------------------------
57 // -----------------------------------------------------------------------
58 // Constructors and Destructor
59 // -----------------------------------------------------------------------
60 StrX(const XMLCh* const toTranscode)
62 // Call the private transcoding method
63 fLocalForm = XMLString::transcode(toTranscode);
68 XMLString::release(&fLocalForm);
71 // -----------------------------------------------------------------------
73 // -----------------------------------------------------------------------
74 const char* localForm() const
80 // -----------------------------------------------------------------------
81 // Private data members
84 // This is the local code page form of the string.
85 // -----------------------------------------------------------------------
89 inline XERCES_STD_QUALIFIER ostream& operator<<(XERCES_STD_QUALIFIER ostream& target, const StrX& toDump)
91 target << toDump.localForm();