aboutsummaryrefslogtreecommitdiff
path: root/examples/working-loaded/xml.test
blob: 8375638a56d7b285d9e7fecf06528fdf43787edd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"lib/xml.ey" include

{ ==indent ==elem
  indent { " " sys .out .writeall } rep
  elem .name sys .out .writeall "\n" sys .out .writeall
  elem .children {
    indent 2 add dumpTree
  } each
} /dumpTree deffst

sys .file ":" via
  "xml.test.xml" :open
  65536 :read ==content
  :close

{
  content xml .parse 0 dumpTree
} {
  "Error during parse: " dump
  .remaining dump
} ?!parse

# vim: syn=elymas