Index: src/xml/SkXMLWriter.cpp |
diff --git a/src/xml/SkXMLWriter.cpp b/src/xml/SkXMLWriter.cpp |
index 62e96687feb8f2213a405289dad5e25e40976682..7a1b04277ef81d4ac14b9c79137445f77af92854 100644 |
--- a/src/xml/SkXMLWriter.cpp |
+++ b/src/xml/SkXMLWriter.cpp |
@@ -169,7 +169,14 @@ static void write_dom(const SkDOM& dom, const SkDOM::Node* node, SkXMLWriter* w, |
{ |
if (!skipRoot) |
{ |
- w->startElement(dom.getName(node)); |
+ const char* elem = dom.getName(node); |
+ if (dom.getType(node) == SkDOM::kText_Type) { |
+ SkASSERT(dom.countChildren(node) == 0); |
+ w->addText(elem, strlen(elem)); |
+ return; |
+ } |
+ |
+ w->startElement(elem); |
SkDOM::AttrIter iter(dom, node); |
const char* name; |