I Hate XML XML has the optimal syntax

  • Slides: 21
Download presentation
I Hate XML

I Hate XML

XML. . . has the optimal syntax: it compresses perfectly is much hyped, so

XML. . . 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!)

XML. . . has a complicated content describing formalism, described in schema's is easily

XML. . . 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

Need XML Validating translation HASH Schema / WSDL file validating complete simple fast

Need XML Validating translation HASH Schema / WSDL file validating complete simple fast

Need HASH Validating translation XML Schema / WSDL file validating complete simple fast

Need HASH Validating translation XML Schema / WSDL file validating complete simple fast

Many (unmaintained) XML modules Translate HASH to XML (and/or back) by None complete, usually

Many (unmaintained) XML modules Translate HASH to XML (and/or back) by None complete, usually slow: they just DWIM

Examples simple. Type <answer>42</answer> answer => 42

Examples simple. Type <answer>42</answer> answer => 42

Examples complex. Type and complex. Type/complex. Content <zoo name=”Burgers Zoo”> <location>Arnhem</location> <animal>monkey</animal> <animal>donkey</animal> </zoo>

Examples complex. Type and complex. Type/complex. Content <zoo name=”Burgers Zoo”> <location>Arnhem</location> <animal>monkey</animal> <animal>donkey</animal> </zoo> zoo => { name => 'Burgers Zoo' , location => 'Arnhem' , animal => [ 'monkey', 'donkey' ] };

Examples complex. Type/simple. Content <price currency=”euro”>300</price> price => { currency => 'euro' , _

Examples complex. Type/simple. Content <price currency=”euro”>300</price> price => { currency => 'euro' , _ => 300 };

Why another? No run-time xpath searches: need for speed! int should not become 1.

Why another? No run-time xpath searches: need for speed! int should not become 1. 9999, but long 2 Integer is Big. Int; must support minimal 18 digits - 121 21 363462 32461532 1 support for list, union, subtitution. Group Real qualified/unqualified name-space support

Examples create a reader; XML to HASH my $rules = XML: : Compile: :

Examples create a reader; XML to HASH my $rules = XML: : Compile: : Schema->new($xml_string); my $read = $rules->compile(READER => 'mytype'); my $hash = $read->($xml); create a writer; HASH to XML my $doc = XML: : Lib. XML: : Document->new('1. 0', 'UTF-8'); my $write = $rules->compile(WRITER => 'mytype'); my $xml = $write->($doc, $hash); based on XML: : Lib. XML

Complete? No, but. . . many optimizations are implemented needs real-life testing W 3

Complete? No, but. . . many optimizations are implemented needs real-life testing W 3 C TRs are unreadable only newest schema spec, prepared to extend.

Future WSDL SOAP CPAN 6

Future WSDL SOAP CPAN 6

I Love YAML (Syck, SOX, SLi. P)

I Love YAML (Syck, SOX, SLi. P)

What is the expected structure? Is it documented? Can it be checked?

What is the expected structure? Is it documented? Can it be checked?

XML to YAML XML HASH Schema YAML

XML to YAML XML HASH Schema YAML

YAML validation XML HASH Schema YAML

YAML validation XML HASH Schema YAML

YAML schema's XML HASH XML Schema YAML HASH YAML

YAML schema's XML HASH XML Schema YAML HASH YAML

I Hate XML I Love YAML

I Hate XML I Love YAML

I Hate XML It's just syntax!!! I Love YAML !

I Hate XML It's just syntax!!! I Love YAML !

It's just syntax!!! ! The real problem is: design the data-structure in a way

It'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