Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

XML Handling

Provides ways of reading and writing XML data.

Reading XML

The XMLReader provides a convenient way for processing large XML files. A set of handlers can be registered on node names. The reader will then parse given data using a memory efficient SAX parser. Once a node with a regisered handler is found, the sub DOM is parsed and sent to the handler as StructuredNode.

Using this approach, very large XML files can be processed with almost constant memory overhead.

For smaller XML files XMLStructuredInput can be used to convert a whole document into a single StructuredNode.

Writing XML

XMLStructuredOutput and XMLGenerator can generate XML.

Abstraction

XMLStructuredInput and XMLStructuredOutput are specified by the interfaces StructuredInput and StructuredOutput. This is used by sirius-web which provides implementations for these interfaces to read and write JSON data. This way services can be created which are capable of reading and writing both.

Webservices

To call XML based REST services the XMLCall can be used which sends and/or receives XML data from an URL endpoint. Note that the base facility which provides a thin abstraction above HttpURLConnection is also made available as Outcall.