com.badlogic.gdx.utils
Class XmlReader

java.lang.Object
  extended by com.badlogic.gdx.utils.XmlReader

public class XmlReader
extends Object

Lightweight XML parser. Supports a subset of XML features: elements, attributes, text, predefined entities, CDATA, mixed content. Namespaces are parsed as part of the element or attribute name. Prologs and doctypes are ignored. Only 8-bit character encodings are supported. Input is assumed to be well formed.

The default behavior is to parse the XML into a DOM. Extends this class and override methods to perform event driven parsing. When this is done, the parse methods will return null.

Author:
Nathan Sweet

Nested Class Summary
static class XmlReader.Element
           
 
Constructor Summary
XmlReader()
           
 
Method Summary
 XmlReader.Element parse(char[] data, int offset, int length)
           
 XmlReader.Element parse(FileHandle file)
           
 XmlReader.Element parse(InputStream input)
           
 XmlReader.Element parse(Reader reader)
           
 XmlReader.Element parse(String xml)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlReader

public XmlReader()
Method Detail

parse

public XmlReader.Element parse(String xml)

parse

public XmlReader.Element parse(Reader reader)
                        throws IOException
Throws:
IOException

parse

public XmlReader.Element parse(InputStream input)
                        throws IOException
Throws:
IOException

parse

public XmlReader.Element parse(FileHandle file)
                        throws IOException
Throws:
IOException

parse

public XmlReader.Element parse(char[] data,
                               int offset,
                               int length)


Copyright © 2013. All Rights Reserved.