{
const xmlChar* pPropValue = reinterpret_cast<const xmlChar*>("value");
- std::unique_ptr<ByteBuffer> pBuf(Tizen::Base::Utility::StringUtil::StringToUtf8N(value));
- if (pBuf)
+ if (value.IsEmpty())
{
- xmlAttrPtr attrPtr = xmlSetProp(pNode, pPropValue, reinterpret_cast<const xmlChar*>(pBuf->GetPointer()));
+ const xmlChar* pZeroLength = reinterpret_cast<const xmlChar*>("");
+ xmlAttrPtr attrPtr = xmlSetProp(pNode, pPropValue, pZeroLength);
if (attrPtr)
{
return true;
}
else
{
- SysLog(NID_APP, "StringToUtf8N is failed.");
+ std::unique_ptr<ByteBuffer> pBuf(Tizen::Base::Utility::StringUtil::StringToUtf8N(value));
+ if (pBuf)
+ {
+ xmlAttrPtr attrPtr = xmlSetProp(pNode, pPropValue, reinterpret_cast<const xmlChar*>(pBuf->GetPointer()));
+ if (attrPtr)
+ {
+ return true;
+ }
+ }
+ else
+ {
+ SysLog(NID_APP, "StringToUtf8N is failed.");
+ }
}
return false;
}