com.badlogic.gdx.utils
Class XmlReader
java.lang.Object
com.badlogic.gdx.utils.XmlReader
public class XmlReader
- extends java.lang.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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XmlReader
public XmlReader()
parse
public XmlReader.Element parse(java.lang.String xml)
parse
public XmlReader.Element parse(java.io.Reader reader)
throws java.io.IOException
- Throws:
java.io.IOException
parse
public XmlReader.Element parse(java.io.InputStream input)
throws java.io.IOException
- Throws:
java.io.IOException
parse
public XmlReader.Element parse(FileHandle file)
throws java.io.IOException
- Throws:
java.io.IOException
parse
public XmlReader.Element parse(char[] data,
int offset,
int length)
open
protected void open(java.lang.String name)
attribute
protected void attribute(java.lang.String name,
java.lang.String value)
entity
protected java.lang.String entity(java.lang.String name)
text
protected void text(java.lang.String text)
close
protected void close()
Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)