$OpenBSD: patch-ext_simplexml_simplexml_c,v 1.1 2013/04/14 23:22:11 sthen Exp $

fix with libxml 2.9, adapted from
https://mail.gnome.org/archives/xml/2012-August/msg00028.html

--- ext/simplexml/simplexml.c.orig.port	Sun Apr 14 13:30:14 2013
+++ ext/simplexml/simplexml.c	Sun Apr 14 13:31:25 2013
@@ -1343,7 +1343,8 @@ SXE_METHOD(asXML)
 
 			xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, ((xmlDocPtr) sxe->document->ptr)->encoding);
 			xmlOutputBufferFlush(outbuf);
-			RETVAL_STRINGL((char *)outbuf->buffer->content, outbuf->buffer->use, 1);
+			RETVAL_STRINGL((char *)xmlOutputBufferGetContent(outbuf),
+			    xmlOutputBufferGetSize(outbuf), 1); 
 			xmlOutputBufferClose(outbuf);
 		}
 	} else {
