File "xml_utils.cpp"

Full path: E:/sites/Single15/tinmung2007/webroot/XAMMP/FileZillaFTP/source/xml_utils.cpp
File size: 487 B
MIME-type:
Charset: utf-8

Download   Open   Back

#include "StdAfx.h"
#include "xml_utils.h"
#include "conversion.h"
#include "tinyxml/tinyxml.h"

namespace XML
{

CStdString ReadText(TiXmlElement* pElement)
{
	TiXmlNode* textNode = pElement->FirstChild();
	if (!textNode || !textNode->ToText())
		return _T("");

	return ConvFromNetwork(textNode->Value());					
}

void SetText(TiXmlElement* pElement, const CStdString& text)
{
	pElement->Clear();
	pElement->LinkEndChild(new TiXmlText(ConvToNetwork(text)));
}

}

PHP File Manager