| 43 | } |
| 44 | |
| 45 | bool HTMLWrapper::saveHTML(std::string &html) |
| 46 | { |
| 47 | if (!mDocument) { |
| 48 | return false; |
| 49 | } |
| 50 | |
| 51 | xmlChar *newHtml = NULL; |
| 52 | int newHtmlSize = 0; |
| 53 | handleError(true, mLastErrorString); |
| 54 | htmlDocDumpMemoryFormat(mDocument, &newHtml, &newHtmlSize, 0); |
| 55 | handleError(false, mLastErrorString); |
| 56 | |
| 57 | if (newHtml) { |
| 58 | convertToString(newHtml, html); |
| 59 | xmlFree(newHtml); |
| 60 | |
| 61 | return true; |
| 62 | } |
| 63 | |
| 64 | return false; |
| 65 | } |
| 66 | |
| 67 | bool HTMLWrapper::createHTML() |
| 68 | { |
no outgoing calls
no test coverage detected