Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/HIT-SCIR/ltp
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneplus committed May 24, 2015
2 parents 381a8bb + fb39c7d commit cdb9399
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/xml4nlp/Xml4nlp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
* In this software, a open source XML parser TinyXML is used
* We Thank to the author of it -- Lee Thomason
*/

#include "Xml4nlp.h"
#include <cstring>
#include "utils/strutils.hpp"
#include "utils/logging.hpp"

using ltp::strutils::trim;

Expand Down Expand Up @@ -98,8 +98,11 @@ int XML4NLP::CreateDOMFromString(const string & str) {
ClearDOM();
if (0 != BuildDOMFrame()) return -1;

string strTmp;
istringstream in(str); // How to use istringstream?
string strTmp = str;
for (size_t i = 0; i < strTmp.size(); ++ i) {
if (strTmp[i] == '\r') { strTmp[i] = '\n'; }
}
istringstream in(strTmp); // How to use istringstream?
int i = 0;
while (getline(in, strTmp)) {
// clean_str(strTmp);
Expand Down

0 comments on commit cdb9399

Please sign in to comment.