ARB
xmlParser.hxx
Go to the documentation of this file.
1 #include <string.h>
2 #include <fstream.h>
3 #include <stdlib.h>
4 #include "sax2Handler.hxx"
5 
6 class StrX {
7 private :
8  char* fLocalForm;
9 
10 public :
11  StrX(const XMLCh* const toTranscode) {
12  // Call the private transcoding method
13  fLocalForm = XMLString::transcode(toTranscode);
14  }
15 
16  ~StrX() {
17  XMLString::release(&fLocalForm);
18  }
19 
20  // Getter methods
21  const char* localForm() const {
22  return fLocalForm;
23  }
24 };
25 
26 inline ostream& operator<<(ostream& target, const StrX& toDump) {
27  target << toDump.localForm();
28  return target;
29 }
30 
StrX(const XMLCh *const toTranscode)
Definition: xmlParser.hxx:11
~StrX()
Definition: xmlParser.hxx:16
const char * localForm() const
Definition: xmlParser.hxx:21
ostream & operator<<(ostream &target, const StrX &toDump)
Definition: xmlParser.hxx:26