* * * Dumping XML tree content to a simple buffer * * * ************************************************************************/ * xmlAttrSerializeContent: * @buf: the XML buffer output * @doc: the document * @attr: the attribute pointer * * Serialize the attribute in the buffer */
| 385 | * Serialize the attribute in the buffer |
| 386 | */ |
| 387 | static void |
| 388 | xmlAttrSerializeContent(xmlOutputBufferPtr buf, xmlAttrPtr attr) |
| 389 | { |
| 390 | xmlNodePtr children; |
| 391 | |
| 392 | children = attr->children; |
| 393 | while (children != NULL) { |
| 394 | switch (children->type) { |
| 395 | case XML_TEXT_NODE: |
| 396 | xmlBufAttrSerializeTxtContent(buf, attr->doc, |
| 397 | children->content); |
| 398 | break; |
| 399 | case XML_ENTITY_REF_NODE: |
| 400 | xmlOutputBufferWrite(buf, 1, "&"); |
| 401 | xmlOutputBufferWriteString(buf, (const char *) children->name); |
| 402 | xmlOutputBufferWrite(buf, 1, ";"); |
| 403 | break; |
| 404 | default: |
| 405 | /* should not happen unless we have a badly built tree */ |
| 406 | break; |
| 407 | } |
| 408 | children = children->next; |
| 409 | } |
| 410 | } |
| 411 | |
| 412 | /** |
| 413 | * xmlBufDumpNotationDecl: |
no test coverage detected