| 133 | } |
| 134 | |
| 135 | bool XMLFileReader::ParseString(XMLTagHandler *baseHandler, |
| 136 | const wxString &xmldata) |
| 137 | { |
| 138 | auto utf8 = xmldata.ToUTF8(); |
| 139 | const char *buffer = utf8.data(); |
| 140 | int len = utf8.length(); |
| 141 | |
| 142 | mBaseHandler = baseHandler; |
| 143 | |
| 144 | if (!ParseBuffer(baseHandler, utf8.data(), utf8.length(), true)) |
| 145 | return false; |
| 146 | |
| 147 | // Even though there were no parse errors, we only succeed if |
| 148 | // the first-level handler actually got called, and didn't |
| 149 | // return false. |
| 150 | if (!mBaseHandler) |
| 151 | { |
| 152 | mErrorStr = XO("Could not parse XML"); |
| 153 | return false; |
| 154 | } |
| 155 | |
| 156 | return true; |
| 157 | } |
| 158 | |
| 159 | bool XMLFileReader::ParseMemoryStream( |
| 160 | XMLTagHandler* baseHandler, const MemoryStream& xmldata) |
no test coverage detected