org.jmol.util
Class XmlReader
java.lang.Object
org.jmol.util.XmlReader
public class XmlReader
- extends Object
Method Summary |
private static String |
extractTag(String data,
String tag,
String closer,
boolean withTag)
|
String |
getLine()
|
static String |
getXmlAttrib(String data,
String what)
|
String |
getXmlData(String name,
String data,
boolean withTag,
boolean allowSelfCloseOption)
|
Point3f |
getXmlPoint(String data,
String key)
|
boolean |
isNext(String name)
|
private static int |
setNext(String data,
String what,
int[] next,
int offset)
shift pointer to a new tag or field contents |
void |
skipTag(String name)
|
private void |
skipTo(String key)
|
String |
toTag(String name)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
br
BufferedReader br
line
String line
XmlReader
public XmlReader(BufferedReader br)
getLine
public String getLine()
toTag
public String toTag(String name)
throws Exception
- Throws:
Exception
skipTag
public void skipTag(String name)
throws Exception
- Throws:
Exception
getXmlData
public String getXmlData(String name,
String data,
boolean withTag,
boolean allowSelfCloseOption)
throws Exception
- Parameters:
name
- data
- withTag
- allowSelfCloseOption
- TODO
- Returns:
- trimmed contents or tag + contents, never closing tag
- Throws:
Exception
extractTag
private static String extractTag(String data,
String tag,
String closer,
boolean withTag)
getXmlAttrib
public static String getXmlAttrib(String data,
String what)
getXmlPoint
public Point3f getXmlPoint(String data,
String key)
setNext
private static int setNext(String data,
String what,
int[] next,
int offset)
- shift pointer to a new tag or field contents
- Parameters:
data
- string of datawhat
- tag or field namenext
- current pointer into dataoffset
- offset past end of "what" for pointer
- Returns:
- pointer to data
skipTo
private void skipTo(String key)
throws Exception
- Throws:
Exception
isNext
public boolean isNext(String name)
throws Exception
- Throws:
Exception