1 / 17

Challenges in handling XML: performance and memory usage 15.11.2001 Sami Poikonen Republica oy

Challenges in handling XML: performance and memory usage 15.11.2001 Sami Poikonen Republica oy. Republica Oy is Finland’s leading provider of products and services based on XML standards. Founded: 1996 Employees: 70+ (11/2001) Offices: Helsinki, Jyväskylä. TOC. DOM SAX

cara-thomas
Télécharger la présentation

Challenges in handling XML: performance and memory usage 15.11.2001 Sami Poikonen Republica oy

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Challenges in handling XML: performance and memory usage 15.11.2001 Sami Poikonen Republica oy

  2. Republica Oy is Finland’s leading provider of products and services based on XML standards. Founded: 1996 Employees: 70+ (11/2001) Offices: Helsinki, Jyväskylä

  3. TOC • DOM • SAX • DOM or SAX or something else... • Transformations • Conclusions

  4. Parsing XML: DOM • Document Object Model • standard API for accessing and creating xml data • tree-based • programming language indepedent • developed by W3C • whole document is read into memory • read and write

  5. <?xml version="1.0"?> <book type="pokkari"> <title>Tuntematon sotilas</title> <author> <name first="Väinö" last="Linna"/> </author> </book> DomNode book | |-->DomNode title | | | |-->DomNode text | |-->DomNode author | |-->DomNode name

  6. Parsing XML: SAX • Simple API for XML • API for accessing xml data • event based • programming language indepedent • not defined by W3C • application has to store fragments into memory • read only

  7. <?xml version="1.0"?> <poem> <line>Roses are red,</line> <line>Violets are blue.</line> <line>Sugar is sweet,</line> <line>and I love you.</line> </poem> Start element: poem Start element: line End element: line Start element: line End element: line Start element: line End element: line Start element: line End element: line End element: poem

  8. DOM or SAX or something else? • DOM: • read and write • need to move back and forth in data • document is human created • SAX: • read only • huge data or streams • data is machine generated Best of both worlds? Adaptive parsing!

  9. Transformations • XSLT: XSL Transformations • XSLT processors are built to use DOM • XSLT to java conversion: still uses DOM • SAX based custom-made application for trasformations • Adaptive parsing with data binding?

  10. Conclusions

  11. Conclusions • When building XML applications, you have to think how will youhandle large chunks of data • Choosing between SAX and DOM is not always trivial • There are more smarter ways to parse XML also • Adaptive parsing with data binding gives a lot of needed performance into transformations • It is easy to reach the limits of XLST processing capabilities • In some cases problems handling xml streams and large files has lead to assume that its is almost impossible to handle those

  12. Contact Information Republica Oy http://www.republica.fi/ Survontie 9 40500 Jyväskylä http://www.x-fetch.com/ Sami Poikonen Vice President, Solutions p. 040 301 1154 sami.poikonen@republica.fi

More Related