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 charcharAt(int index)intlength()static CharSequenceprettifyXml(CharSequence xml)Prettifies given XML String.CharSequencesubSequence(int start, int end)StringtoString()-
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:
lengthin interfaceCharSequence
-
charAt
public char charAt(int index)
- Specified by:
charAtin interfaceCharSequence
-
subSequence
public CharSequence subSequence(int start, int end)
- Specified by:
subSequencein interfaceCharSequence
-
toString
public String toString()
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-
-