."),
ET.XML("And finally, here is an embedded XHTML fragment.
"),
)
)
)
print ET.tostring(page)
Here's a prettyprinted version of the output from the above script::
This is a sample document
Hello!
This is a paragraph with bold text in it!
This is another paragraph, with link.
Here are some reserved characters: <spam&egg>.
And finally, here is an embedded XHTML fragment.
For namespace support, you can pass a namespace map (``nsmap``)
and/or a specific target ``namespace`` to the ElementMaker class::
>>> E = ElementMaker(namespace="http://my.ns/")
>>> print(ET.tostring( E.test ))
>>> E = ElementMaker(namespace="http://my.ns/", nsmap={'p':'http://my.ns/'})
>>> print(ET.tostring( E.test ))
Nc s |d urd| d | _ nd | _ |r.t|| _nd | _|d urPt|sHJ || _ntj| _ rft ni dd }dd }t vr| t<