aboutsummaryrefslogtreecommitdiff
path: root/src/support/xerces_string_guard.cc
blob: 14ad29b027f885bb0cbfae0638eac456bad06de1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "xerces_string_guard.h"

namespace InputXSLT {

XercesStringGuard::XercesStringGuard(const std::string& src):
	string_(xercesc::XMLString::transcode(src.data())) { }

XercesStringGuard::~XercesStringGuard() {
	xercesc::XMLString::release(
		const_cast<XMLCh**>(&this->string_)
	);
}

XMLCh* XercesStringGuard::operator*() {
	return this->string_;
}

}