XML and Object Serialization. Structure of an XML Document Header Root Element Start Tags / End Tags...
5
XML and Object Serialization
-
Upload
nathaniel-ward -
Category
Documents
-
view
217 -
download
0
Transcript of XML and Object Serialization. Structure of an XML Document Header Root Element Start Tags / End Tags...
XML and Object Serialization
Structure of an XML Document
• Header• Root Element• Start Tags / End Tags• Element Contents– Child Elements– Text– Both (mixed contents)
• Element Attributes• Comments• Entity References
Parsing / Searching XML Documents
• StAX Parser– XMLStreamReader– Example
• DOM Parser– Document Object Model (DOM)– Example
• Searching DOM with XPath– Example
Creating XML Documents
• StAX– Example
• DOM– Example
Object Serialization
• Java binary serialization– Example
• XML– XStream Example
• JSON– XStream Example