public RawTreeNode() { pVec = null; pAttrs = null; Name = ""; Value = ""; xmltype = XMLTYPE.XML_NONE; parent = null; }
public void AddChild(RawTreeNode pChild) { if (pVec == null) { pVec = new List <RawTreeNode>(); } pChild.SetParent(this); pVec.Add(pChild); }
public bool Append(RawTreeNode child) { if (child == null) { return(false); } child.SetParent(this); GetVec().Add(child); return(true); }
public RawTreeNode FindRoot() { RawTreeNode tmp = this; RawTreeNode found = null; while (true) { if (tmp.parent != null) { tmp = tmp.parent; } else { found = tmp; break; } } return(found); }
public RawElement Add(RawTreeNode node1) { Append(node1); return(this); }
public void SetParent(RawTreeNode p) { parent = p; }
public string FindRootName() { RawTreeNode found = FindRoot(); return(found.GetName()); }