Lines Matching +defs:xml +defs:node
715 char* XMLDocument::Identify( char* p, XMLNode** node, bool first )
717 TIXMLASSERT( node );
723 *node = 0;
790 *node = returnNode;
799 for ( const XMLNode* node=FirstChild(); node; node=node->NextSibling() ) {
800 if ( !node->Accept( visitor ) ) {
925 void XMLNode::DeleteChild( XMLNode* node )
927 TIXMLASSERT( node );
928 TIXMLASSERT( node->_document == _document );
929 TIXMLASSERT( node->_parent == this );
930 Unlink( node );
931 TIXMLASSERT(node->_prev == 0);
932 TIXMLASSERT(node->_next == 0);
933 TIXMLASSERT(node->_parent == 0);
934 DeleteNode( node );
1022 // The last node or the only node.
1039 for( const XMLNode* node = _firstChild; node; node = node->_next ) {
1040 const XMLElement* element = node->ToElementWithName( name );
1051 for( const XMLNode* node = _lastChild; node; node = node->_prev ) {
1052 const XMLElement* element = node->ToElementWithName( name );
1063 for( const XMLNode* node = _next; node; node = node->_next ) {
1064 const XMLElement* element = node->ToElementWithName( name );
1075 for( const XMLNode* node = _prev; node; node = node->_prev ) {
1076 const XMLElement* element = node->ToElementWithName( name );
1101 // 'endTag' is the end tag for this node, it is returned by a call to a child.
1110 XMLNode* node = 0;
1112 p = _document->Identify( p, &node, first );
1114 if ( node == 0 ) {
1119 const int initialLineNum = node->_parseLineNum;
1122 p = node->ParseDeep( p, &endTag, curLineNumPtr );
1124 _document->DeleteNode( node );
1131 const XMLDeclaration* const decl = node->ToDeclaration();
1138 // Optimized due to a security test case. If the first node is
1139 // a declaration, and the last node is a declaration, then only
1157 _document->DeleteNode( node );
1162 XMLElement* ele = node->ToElement();
1169 node->_memPool->SetTracked(); // created and then immediately deleted.
1170 DeleteNode( node );
1192 _document->DeleteNode( node );
1196 InsertEndChild( node );
1201 /*static*/ void XMLNode::DeleteNode( XMLNode* node )
1203 if ( node == 0 ) {
1206 TIXMLASSERT(node->_document);
1207 if (!node->ToDocument()) {
1208 node->_document->MarkInUse(node);
1211 MemPool* pool = node->_memPool;
1212 node->~XMLNode();
1213 pool->Free( node );
1703 /* skip comment node */
1704 const XMLNode* node = FirstChild();
1705 while (node) {
1706 if (node->ToComment()) {
1707 node = node->NextSibling();
1713 if ( node && node->ToText() ) {
1714 return node->Value();
1998 // There is a minor bug here: if the attribute in the source xml
2054 XMLElement* node = _document->NewElement(name);
2055 return InsertEndChild(node) ? node : 0;
2060 XMLComment* node = _document->NewComment(comment);
2061 return InsertEndChild(node) ? node : 0;
2066 XMLText* node = _document->NewText(text);
2067 return InsertEndChild(node) ? node : 0;
2072 XMLDeclaration* node = _document->NewDeclaration(text);
2073 return InsertEndChild(node) ? node : 0;
2078 XMLUnknown* node = _document->NewUnknown(text);
2079 return InsertEndChild(node) ? node : 0;
2160 for ( const XMLNode* node=FirstChild(); node; node=node->NextSibling() ) {
2161 if ( !node->Accept( visitor ) ) {
2224 void XMLDocument::MarkInUse(const XMLNode* const node)
2226 TIXMLASSERT(node);
2227 TIXMLASSERT(node->_parent == 0);
2230 if (node == _unlinked[i]) {
2279 for (const XMLNode* node = this->FirstChild(); node; node = node->NextSibling()) {
2280 target->InsertEndChild(node->DeepClone(target));
2311 dec->SetValue( str ? str : "xml version=\"1.0\" encoding=\"UTF-8\"" );
2339 void XMLDocument::DeleteNode( XMLNode* node ) {
2340 TIXMLASSERT( node );
2341 TIXMLASSERT(node->_document == this );
2342 if (node->_parent) {
2343 node->_parent->DeleteChild( node );
2350 node->_memPool->SetTracked();
2352 XMLNode::DeleteNode(node);
2460 XMLError XMLDocument::Parse( const char* xml, size_t nBytes )
2464 if ( nBytes == 0 || !xml || !*xml ) {
2469 nBytes = strlen( xml );
2473 memcpy( _charBuffer, xml, nBytes );
2738 PushDeclaration( "xml version=\"1.0\"" );