XmlReader
Date: 2019-10-22

org.jmol.jvxl.readers

## Class XmlReader

- java.lang.Object
- - org.jmol.jvxl.readers.XmlReader

-     public class XmlReader
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) java.io.BufferedReader` | `br`
    `(package private) java.lang.String` | `line`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XmlReader(java.io.BufferedReader br)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private static java.lang.String` | `extractTag(java.lang.String data, java.lang.String tag, java.lang.String closer, boolean withTag)`
    `static java.lang.String` | `extractTagOnly(java.lang.String data, java.lang.String tag)`
    `java.lang.String` | `getLine()`
    `static java.lang.String` | `getXmlAttrib(java.lang.String data, java.lang.String what)`
    `java.lang.String` | `getXmlData(java.lang.String name, java.lang.String data, boolean withTag, boolean allowSelfCloseOption)`
    `javajs.util.P3` | `getXmlPoint(java.lang.String data, java.lang.String key)`
    `boolean` | `isNext(java.lang.String name)`
    `private static int` | `setNext(java.lang.String data, java.lang.String what, int[] next, int offset)` shift pointer to a new tag or field contents
    `void` | `skipTag(java.lang.String name)`
    `private void` | `skipTo(java.lang.String key)`
    `java.lang.String` | `toTag(java.lang.String name)`
    `static java.lang.String` | `unwrapCdata(java.lang.String s)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### br

          java.io.BufferedReader br

    - #### line

          java.lang.String line

  - ### Constructor Detail

    - #### XmlReader

          public XmlReader(java.io.BufferedReader br)

  - ### Method Detail

    - #### getLine

          public java.lang.String getLine()

    - #### toTag

          public java.lang.String toTag(java.lang.String name)
                                 throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### skipTag

          public void skipTag(java.lang.String name)
                       throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### getXmlData

          public java.lang.String getXmlData(java.lang.String name,
                                             java.lang.String data,
                                             boolean withTag,
                                             boolean allowSelfCloseOption)
                                      throws java.lang.Exception

      Parameters:
        `name` -
        `data` -
        `withTag` -
        `allowSelfCloseOption` - TODO
      Returns:
        trimmed contents or tag + contents, never closing tag
      Throws:
        `java.lang.Exception`

    - #### extractTagOnly

          public static java.lang.String extractTagOnly(java.lang.String data,
                                                        java.lang.String tag)

    - #### extractTag

          private static java.lang.String extractTag(java.lang.String data,
                                                     java.lang.String tag,
                                                     java.lang.String closer,
                                                     boolean withTag)

    - #### unwrapCdata

          public static java.lang.String unwrapCdata(java.lang.String s)

      Parameters:
        `s` -
      Returns:
        unwrapped text

    - #### getXmlAttrib

          public static java.lang.String getXmlAttrib(java.lang.String data,
                                                      java.lang.String what)

    - #### getXmlPoint

          public javajs.util.P3 getXmlPoint(java.lang.String data,
                                            java.lang.String key)

    - #### setNext

          private static int setNext(java.lang.String data,
                                     java.lang.String what,
                                     int[] next,
                                     int offset)

      shift pointer to a new tag or field contents
      Parameters:
        `data` - string of data
        `what` - tag or field name
        `next` - current pointer into data
        `offset` - offset past end of "what" for pointer
      Returns:
        pointer to data

    - #### skipTo

          private void skipTo(java.lang.String key)
                       throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### isNext

          public boolean isNext(java.lang.String name)
                         throws java.lang.Exception

      Throws:
        `java.lang.Exception`