Remove trailing white spaces
[SXSI/xpathcomp.git] / XMLDocShredder.cpp
index 7f7d408..cb70e19 100644 (file)
@@ -102,8 +102,11 @@ void XMLDocShredder::processStartElement()
   // fetch element name; this will be the full qualified name
   ustring name = reader_->get_name();
   bool empty = false;
-  
-  tb->NewOpenTag(name);
+  size_t found = name.find_first_of(':');
+  if (found == ustring::npos)  
+    tb->NewOpenTag(name);
+  else
+    tb->NewOpenTag(name.substr(found+1,name.length() - found - 1));
   
   /* We must be really carefull here. calling process attributes moves
      the document pointer on the last attribute, hence calling reader_->is_empty