LibXML and whitespace
Maurice Mengel <[email protected]> Fri, 18 Feb 2011 12:01:56 -0500
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Message-ID | <[email protected]> |
Hi fellows, I am using XML::LibXML/XML::LibXSLT to create xml documents. I get output like this where I don't like the whitespace <lido:lidoWrap xmlns:lido="http://www.lido-schema.org" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"> <lido:lido> <lido:lidoRecID> spk:obj-538 </lido:lidoRecID> My xml editor formats it like this: <?xml version="1.0" encoding="UTF-8"?> <lido:lidoWrap xmlns:lido="http://www.lido-schema.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <lido:lido> <lido:lidoRecID>spk:obj-538</lido:lidoRecID> <lido:descriptiveMetadata> <lido:objectClassificationWrap> <lido:objectWorkTypeWrap> <lido:objectWorkType> <lido:term>Musikinstrument</lido:term> xmllint --format does make it much better either. I tried to play with the xslt commands, but to no avail: <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" /> <xsl:strip-space elements="*"/> I wonder if you have any tipps for me. Is there any perl way to format the output nicer? Thanks! maurice _______________________________________________ Perl-XML mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs