Package org.onlab.util
Class XmlString
- java.lang.Object
-
- org.onlab.util.XmlString
-
- All Implemented Interfaces:
CharSequence
public class XmlString extends Object implements CharSequence
PrettyPrinted XML String.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description char
charAt(int index)
int
length()
static CharSequence
prettifyXml(CharSequence xml)
Prettifies given XML String.CharSequence
subSequence(int start, int end)
String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.CharSequence
chars, codePoints
-
-
-
-
Method Detail
-
prettifyXml
public static CharSequence prettifyXml(CharSequence xml)
Prettifies given XML String.- Parameters:
xml
- input XML- Returns:
- prettified input or input itself is input is not well-formed
-
length
public int length()
- Specified by:
length
in interfaceCharSequence
-
charAt
public char charAt(int index)
- Specified by:
charAt
in interfaceCharSequence
-
subSequence
public CharSequence subSequence(int start, int end)
- Specified by:
subSequence
in interfaceCharSequence
-
toString
public String toString()
- Specified by:
toString
in interfaceCharSequence
- Overrides:
toString
in classObject
-
-