| XML Tree Scoreboard | ||
| Rank | Username | Score |
primo |
1000 (47 B) | |
leonid |
1000 (47 B) | |
Wim |
979 (48 B) | |
| 4 |
JWvdVeer |
979 (48 B) |
| 5 |
rekotiira |
979 (48 B) |
| 6 |
ToastyX |
979 (48 B) |
| 7 |
ralf |
979 (48 B) |
| 8 |
six |
959 (49 B) |
| 9 |
Electron |
959 (49 B) |
| 10 |
lheurt |
940 (50 B) |
| 11 |
sl1m |
940 (50 B) |
| 12 |
iWinkLeon |
922 (51 B) |
| 13 |
nubs |
855 (55 B) |
| 14 |
Cyrion |
825 (57 B) |
| 15 |
Steinigtmich |
701 (67 B) |
| 16 |
eremit |
681 (69 B) |
| 17 |
henrik |
671 (70 B) |
| 18 |
ptnplanet |
653 (72 B) |
| 19 |
garas |
644 (73 B) |
| 20 |
runekg |
635 (74 B) |
| Recent Activity | |||
| Username | Bytes | Time ago | Result |
|---|---|---|---|
artisk82 |
188 | March 09 2013, 00:48:37 | |
artisk82 |
349 | March 09 2013, 00:24:06 | |
artisk82 |
349 | March 09 2013, 00:23:50 | |
artisk82 |
357 | March 09 2013, 00:22:09 | |
artisk82 |
21 | March 08 2013, 23:55:09 | |
artisk82 |
378 | March 08 2013, 23:52:14 | |
artisk82 |
360 | March 08 2013, 23:49:37 | |
artisk82 |
360 | March 08 2013, 23:47:15 | |
artisk82 |
350 | March 08 2013, 23:40:58 | |
vird |
100 | March 04 2013, 16:23:04 | |
nubs |
55 | February 21 2013, 17:19:49 | |
nubs |
55 | February 21 2013, 17:15:26 | |
nubs |
58 | February 21 2013, 16:48:06 | |
nubs |
64 | February 21 2013, 16:39:18 | |
nubs |
71 | February 21 2013, 16:23:42 | |
Challenge: XML Tree
Challenge information
| Challenge Type | Private |
|---|---|
| Challenge Status | Open |
| Constant name | XML |
| Trim method | Full trim |
| Rating | [ up ] [ down ] |
Instructions
Your program should output a tree showing the structure of an XML document, indented with 4 spaces for each depth of the tree. All XML will be well-formed. Tags may be closed within the tag itself (<tag />) XML will not contain <> within attributes, comments or CDATA segments. The XML will not contain the <?xml tag. The XML may contain comments (<!--). These should be ignored. Whitespace in the XML is considered to follow normal XML rules.
Example
Show/hide Input<html>
<head>
<title />
</head>
<body>
<!-- Some comment -->
<hr/>
<div>
<div>asd</div>
</div>
</body>
</html>
html
head
title
body
hr
div
div
