Subject: | xml2yaml should use mixed_elements => TEXTUAL |
For the attached xhtml file xml2yaml would create the following
representation:
---
body:
cho_block:
- p:
_: !!perl/scalar:XML::LibXML::Element 34418110592
_MIXED_ELEMENT_MODE: ATTRIBUTES
head:
title:
_: !!perl/scalar:XML::LibXML::Element 34418110528
_MIXED_ELEMENT_MODE: ATTRIBUTES
(For your convenience, the required schema files may be downloaded from
http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd and
http://www.w3.org/2001/xml.xsd)
The usage of internal perl objects is not very useful here. It would
probably better to use mixed_elements => 'TEXTUAL' instead, which yields
the following output:
---
body:
cho_block:
- p:
_: Mixed test
_MIXED_ELEMENT_MODE: TEXTUAL
head:
title:
_: test
_MIXED_ELEMENT_MODE: TEXTUAL
As this is sometimes losing information (in this example the <span> is
completely lost), it would maybe be better to allow the user to specify
another option for mixed_elements, e.g. XML_STRING.
Regards,
Slaven
Subject: | test.xhtml |
Message body not shown because it is not plain text.