File: example1.pl

package info (click to toggle)
libxml-libxml-debugging-perl 0.103-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 180 kB
  • sloc: perl: 204; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 454 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use 5.010;
use JSON;
use XML::LibXML::Debugging;

my $dom    = XML::LibXML->new->parse_string(<<XML);
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:dc="http://purl.org/dc/terms/"
	xml:lang="en">
	<head>
		<title>Test</title>
	</head>
	<body dc:title="Test">
		<h1>Test</h1>
		<p>Just a test!</p>
	</body>
</html>
XML

say "========";
say $dom->toClarkML;
say "--------";
say to_json($dom->toDebuggingHash, {pretty=>1, canonical=>1});
say "========";