Download presentation
Presentation is loading. Please wait.
Published byClaude Rogers Modified over 9 years ago
1
XML eXtensible Markup Language w3c standard Why? Store and transport data Easy data exchange Create more languages WSDL (Web Service Description Language) RDF (Resource Description Framework) RSS (Really Simple Syndication) Self-describing data Easy to learn Must learn
2
3 Major Components XML XSL (eXtensible Stylesheet Language) Style sheet language for XML documents XSD (XML Schema Definition) Describes the structure of an XML document
3
XML Document Tove Jani Reminder Don't forget me this weekend! Processing Instruction Comment Element Attribute
4
XML Documents Well formed and Valid Well formed Should only contain one root element All tags should have corresponding end tag Tags never overlap( … ) Attributes must be quoted Valid Must be well formed and conforms to the schema
5
XML Documents Has tree structure Tags are case sensitive is different from Comments
6
XML Elements Can contain Other elements Text Attributes Valid names,, Invalid names,,
7
XML elements and Attributes Data goes as elements john Meta data goes as attributes graph.gif
8
1.0 vs 1.1 1.0 – everything not permitted is forbidden 1.1 – everything not forbidden is permitted 1.0 is compatible with 1.1, not vise-versa Forward compatible Does not affects to English documents
9
XML Namespaces There can be common elements in multiple domains File in hardware and office 18 3.69 Employee data 25
10
XML Namespaces How to distinguish? Solution : namespaces 18 3.69 Employee data 25
11
XML Parsers A piece of software which reads the content from the XML documents and present it to the application Implementing xml parser Java way SAX (Simple API for XML) DOM (Document Object Model) StAX (Streaming API for XML)
12
XML Parsers XML Parser Demos
13
XML Parsers FeatureStAXSAXDOM API TypePull, StreamingPush, StreamingIn memory tree Ease of UseHighMediumHigh XPath CapabilityNo Yes CPU and Memory Efficiency Good Varies Forward OnlyYes No Read XMLYes Write XMLYesNoYes CRUDNo Yes
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.