Tree::SetString

Version

Minimum Origin Version Required: Origin 9.0 SR0

Description

Set Tree from XML string

Syntax

BOOL SetString( LPCSTR lpcszXML )

Parameters

lpcszXML
[input] XML string

Return

Returns TRUE on success, FALSE on failure.

Examples

EX1

void TreeNode_SetString_ex1()
{
    string strXML = "<?xml version=\"1.0\"?><OriginStorage><Category NodeID=\"268435456\" Label=\"Line\"><Template3 NodeID=\"46\" Name=\"DropLine.otp\"/></Category></OriginStorage>";
    
    Tree tr;
    if(tr.SetString(strXML))
        out_tree(tr);
    
    string strXMLGet;
    if(tr.GetString(strXMLGet))
        printf("XML stirng from the tr: %s", strXMLGet);
}

Remark

See Also

Tree::GetString

header to Included

origin.h