diff options
author | drumsetmonkey <abelleisle@roadrunner.com> | 2016-03-04 07:31:12 -0500 |
---|---|---|
committer | drumsetmonkey <abelleisle@roadrunner.com> | 2016-03-04 07:31:12 -0500 |
commit | 6af8dcbaa41a7db52ff8f6074d2b113ec7eaf12d (patch) | |
tree | 96be39f3670d5dd2d71b001340d7aff9b6164003 /src/tinyxml2.cpp | |
parent | b61bbe703a03d58dc660d05b4bb32f69a4c70436 (diff) | |
parent | fe5ea7fe415857f49d6630f2b0f50e1246c38eee (diff) |
Merge branch 'master' of http://github.com/tcsullivan/gamedev
Diffstat (limited to 'src/tinyxml2.cpp')
-rwxr-xr-x | src/tinyxml2.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/tinyxml2.cpp b/src/tinyxml2.cpp index c4ea7cd..6198418 100755 --- a/src/tinyxml2.cpp +++ b/src/tinyxml2.cpp @@ -1400,6 +1400,18 @@ const XMLAttribute* XMLElement::FindAttribute( const char* name ) const return 0;
}
+std::string XMLElement::StrAttribute( const char* name, const char* value ) const
+{
+ std::string str;
+ const XMLAttribute* a = FindAttribute( name );
+ if ( a ) {
+ if ( !value || XMLUtil::StringEqual( a->Value(), value )) {
+ str = a->Value();
+ return str;
+ }
+ }
+ return str;
+}
const char* XMLElement::Attribute( const char* name, const char* value ) const
{
@@ -1413,7 +1425,6 @@ const char* XMLElement::Attribute( const char* name, const char* value ) const return 0;
}
-
const char* XMLElement::GetText() const
{
if ( FirstChild() && FirstChild()->ToText() ) {
|