Changeset 28199 in vbox
- Timestamp:
- Apr 12, 2010 12:20:33 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/cpp/xml.h
r28164 r28199 455 455 int getLineNumber() const; 456 456 457 int isElement() 457 int isElement() const 458 458 { 459 459 return m_Type == IsElement; -
trunk/src/VBox/Runtime/r3/xml.cpp
r28164 r28199 494 494 } 495 495 496 /** 497 * Returns the name of the node, which is either the element name or 498 * the attribute name. For other node types it probably returns NULL. 499 * @return 500 */ 496 501 const char* Node::getName() const 497 502 { … … 664 669 { 665 670 int i = 0; 666 Data::InternalNodesList::const_iterator 667 it, 668 last = m->children.end(); 669 for (it = m->children.begin(); 670 it != last; 671 for (Data::InternalNodesList::iterator it = m->children.begin(); 672 it != m->children.end(); 671 673 ++it) 672 674 { 673 675 // export this child node if ... 674 if ( (!pcszMatch) // the caller wants all nodes or675 || (!strcmp(pcszMatch, (**it).getName())) // the element name matches676 )677 {678 Node *pNode = (*it).get();679 if (pNode->isElement())680 children.push_back(static_cast<ElementNode*>(p Node));681 ++i;682 }676 Node *p = it->get(); 677 if (p->isElement()) 678 if ( (!pcszMatch) // the caller wants all nodes or 679 || (!strcmp(pcszMatch, p->getName())) // the element name matches 680 ) 681 { 682 children.push_back(static_cast<ElementNode*>(p)); 683 ++i; 684 } 683 685 } 684 686 return i;
Note:
See TracChangeset
for help on using the changeset viewer.