Go to the documentation of this file.
57 if(child->tag() == childTag && !child->isNull())
65 if(childIndex <
size() && childIndex >= 0)
74 if(child->tag() == childTag && !child->isNull()) {
86 if(childIndex >=
size() || childIndex < 0)
96 if(node->tag() == newChild->
tag() && (node->isUnique() || newChild->
isUnique())) {
99 if(node->hasChildren() && newChild->
hasChildren()) {
101 tmpNode->
merge(newChild);
102 newChild->
copy(tmpNode);
111 if(node != newChild && node->
tag() == newChild->
tag()) {
void setTag(const std::string &tag)
void setSource(const std::string &source)
All OTML errors throw this exception.
bool removeChild(const OTMLNodePtr &oldChild)
static std::string emitNode(const OTMLNodePtr &node, int currentDepth=-1)
Emits a node and it's children to a std::string.
void addChild(const OTMLNodePtr &newChild)
bool replaceChild(const OTMLNodePtr &oldChild, const OTMLNodePtr &newChild)
void setUnique(bool unique)
virtual std::string emit()
OTMLNodePtr getIndex(int childIndex)
void setValue(const std::string &value)
std::vector< OTMLNodePtr > OTMLNodeList
OTMLNodePtr get(const std::string &childTag)
void merge(const OTMLNodePtr &node)
void copy(const OTMLNodePtr &node)
OTMLNodePtr atIndex(int childIndex)
OTMLNodePtr at(const std::string &childTag)
static OTMLNodePtr create(std::string tag="", bool unique=false)