| 608 | } |
| 609 | |
| 610 | void TiXmlElement::StreamOut( TIXML_OSTREAM * stream ) const |
| 611 | { |
| 612 | (*stream) << TEXT("<") << value; |
| 613 | |
| 614 | TiXmlAttribute* attrib; |
| 615 | for ( attrib = attributeSet.First(); attrib; attrib = attrib->Next() ) |
| 616 | { |
| 617 | (*stream) << TEXT(" "); |
| 618 | attrib->StreamOut( stream ); |
| 619 | } |
| 620 | |
| 621 | // If this node has children, give it a closing tag. Else |
| 622 | // make it an empty tag. |
| 623 | TiXmlNode* node; |
| 624 | if ( firstChild ) |
| 625 | { |
| 626 | (*stream) << TEXT(">"); |
| 627 | |
| 628 | for ( node = firstChild; node; node=node->NextSibling() ) |
| 629 | { |
| 630 | node->StreamOut( stream ); |
| 631 | } |
| 632 | (*stream) << TEXT("</") << value << TEXT(">"); |
| 633 | } |
| 634 | else |
| 635 | { |
| 636 | (*stream) << TEXT(" />"); |
| 637 | } |
| 638 | } |
| 639 | |
| 640 | TiXmlNode* TiXmlElement::Clone() const |
| 641 | { |
no test coverage detected