Title: I Hate XML
1I Hate XML
2XML...
- has the optimal syntax it compresses perfectly
- is much hyped, so must be excellent
- is well supported in Java, so available to
anyone!... and Perl support? - is used everywhere (help!)
3XML...
- has a complicated content describing formalism,
described in schema's - is easily extensible
- XML its noting more than Yet Another
Syntax!!!!with an optional formalism
4Need
Validating translation
XML
HASH
- validating
- complete
- simple
- fast
Schema / WSDL file
5Need
Validating translation
HASH
XML
- validating
- complete
- simple
- fast
Schema / WSDL file
6Many (unmaintained) XML modules
- Translate HASH to XML (and/or back) by
- None complete, usually slow they just DWIM
7Examples
ltanswergt42lt/answergt answer gt 42
8Examples
- complexType and complexType/complexContent
ltzoo nameBurgers Zoogt ltlocationgtArnhemlt/loca
tiongt ltanimalgtmonkeylt/animalgt
ltanimalgtdonkeylt/animalgt lt/zoogt zoo gt name
gt 'Burgers Zoo' , location gt
'Arnhem' , animal gt 'monkey',
'donkey'
9Examples
- complexType/simpleContent
ltprice currencyeurogt300lt/pricegt price gt
currency gt 'euro' , _
gt 300
10Why another?
- No run-time xpath searches need for speed!
- int should not become 1.9999, but long long 2
- Integer is BigInt must support minimal 18
digits- 121 21 363462 32461532 1 - support for list, union, subtitutionGroup
- Real qualified/unqualified name-space support
11Examples
- create a reader XML to HASH
- create a writer HASH to XML
- based on XMLLibXML
my rules XMLCompileSchema-gtnew(xml_string
) my read rules-gtcompile(READER gt
'mytype') my hash read-gt(xml) my
doc XMLLibXMLDocument-gtnew('1.0',
'UTF-8') my write rules-gtcompile(WRITER gt
'mytype') my xml write-gt(doc, hash)
12Complete?
- No, but...
- many optimizations are implemented
- needs real-life testing
- W3C TRs are unreadable
- only newest schema spec, prepared to extend.
13Future
14I Love YAML (Syck, SOX, SLiP)
?
?
15What is the expected structure? Is it
documented? Can it be checked?
16XML to YAML
XML
HASH
YAML
Schema
17YAML validation
XML
HASH
YAML
Schema
18YAML schema's
XML
HASH
YAML
XML
HASH
YAML
Schema
19I Hate XML
I Love YAML
20I Hate XML
It's just syntax!!!!
I Love YAML
21It's just syntax!!!!
The real problem is design the data-structure in
a way that it can last for a very long time AND
DOCUMENT THAT