I Hate XML - PowerPoint PPT Presentation

About This Presentation
Title:

I Hate XML

Description:

animal donkey /animal /zoo zoo = { name = 'Burgers Zoo' , location = 'Arnhem' , animal = [ 'monkey', 'donkey' ] Examples. complexType/simpleContent ... – PowerPoint PPT presentation

Number of Views:53
Avg rating:3.0/5.0
Slides: 22
Provided by: perlOv
Category:
Tags: xml | donkey | hate

less

Transcript and Presenter's Notes

Title: I Hate XML


1
I Hate XML
2
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!)

3
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

4
Need
Validating translation
XML
HASH
  • validating
  • complete
  • simple
  • fast

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

Schema / WSDL file
6
Many (unmaintained) XML modules
  • Translate HASH to XML (and/or back) by
  • None complete, usually slow they just DWIM

7
Examples
  • simpleType

ltanswergt42lt/answergt answer gt 42
8
Examples
  • 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'
9
Examples
  • complexType/simpleContent

ltprice currencyeurogt300lt/pricegt price gt
currency gt 'euro' , _
gt 300
10
Why 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

11
Examples
  • 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)
12
Complete?
  • No, but...
  • many optimizations are implemented
  • needs real-life testing
  • W3C TRs are unreadable
  • only newest schema spec, prepared to extend.

13
Future
  • WSDL
  • SOAP
  • CPAN6

14
I Love YAML (Syck, SOX, SLiP)
?
?
15
What is the expected structure? Is it
documented? Can it be checked?
16
XML to YAML
XML
HASH
YAML
Schema
17
YAML validation
XML
HASH
YAML
Schema
18
YAML schema's
XML
HASH
YAML
XML
HASH
YAML
Schema
19
I Hate XML
I Love YAML
20
I Hate XML
It's just syntax!!!!
I Love YAML
21
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
Write a Comment
User Comments (0)
About PowerShow.com