| 339 | } |
| 340 | |
| 341 | void XmlDocument::readQuotedString (String& result) |
| 342 | { |
| 343 | auto quote = readNextChar(); |
| 344 | |
| 345 | while (! outOfData) |
| 346 | { |
| 347 | auto c = readNextChar(); |
| 348 | |
| 349 | if (c == quote) |
| 350 | break; |
| 351 | |
| 352 | --input; |
| 353 | |
| 354 | if (c == '&') |
| 355 | { |
| 356 | readEntity (result); |
| 357 | } |
| 358 | else |
| 359 | { |
| 360 | auto start = input; |
| 361 | |
| 362 | for (;;) |
| 363 | { |
| 364 | auto character = *input; |
| 365 | |
| 366 | if (character == quote) |
| 367 | { |
| 368 | result.appendCharPointer (start, input); |
| 369 | ++input; |
| 370 | return; |
| 371 | } |
| 372 | |
| 373 | if (character == '&') |
| 374 | { |
| 375 | result.appendCharPointer (start, input); |
| 376 | break; |
| 377 | } |
| 378 | |
| 379 | if (character == 0) |
| 380 | { |
| 381 | setLastError ("unmatched quotes", false); |
| 382 | outOfData = true; |
| 383 | break; |
| 384 | } |
| 385 | |
| 386 | ++input; |
| 387 | } |
| 388 | } |
| 389 | } |
| 390 | } |
| 391 | |
| 392 | XmlElement* XmlDocument::readNextElement (const bool alsoParseSubElements) |
| 393 | { |
nothing calls this directly
no test coverage detected