Package ghidra.util.xml
Class SpecXmlUtils
java.lang.Object
ghidra.util.xml.SpecXmlUtils
Utilities for encoding and decoding XML datatypes for use in specification files that
are validated by RelaxNG. This currently includes the SLEIGH/Decompiler configuration files.
I.e.
.ldef files
.pspec files
.cspec files
.sla files
Philosophy here is to use and enforce datatype encodings from XML schemas
to try to be as standard as possible and facilitate use of relax grammars etc. But in decoding
possibly be a little more open to deal with resources generated outside of our control.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleandecodeBoolean(String val) static booleandecodeBoolean(String val, boolean defaultValue) static intstatic longdecodeLong(String longString) static Booleanstatic StringencodeBoolean(boolean val) static voidencodeBooleanAttribute(StringBuilder buf, String nm, boolean val) static voidencodeDoubleAttribute(StringBuilder buf, String nm, double val) static StringencodeSignedInteger(long val) static voidencodeSignedIntegerAttribute(StringBuilder buf, String nm, long val) static voidencodeStringAttribute(StringBuilder buf, String nm, String val) static StringencodeUnsignedInteger(long val) static voidencodeUnsignedIntegerAttribute(StringBuilder buf, String nm, long val) static ErrorHandlerstatic voidxmlEscape(StringBuilder buf, String val) static voidxmlEscapeAttribute(StringBuilder buf, String nm, String val) static voidxmlEscapeWriter(Writer writer, String val)
-
Constructor Details
-
SpecXmlUtils
public SpecXmlUtils()
-
-
Method Details
-
decodeNullableBoolean
-
decodeBoolean
-
decodeBoolean
-
encodeBoolean
-
encodeBooleanAttribute
-
encodeStringAttribute
-
encodeSignedInteger
-
encodeUnsignedInteger
-
encodeSignedIntegerAttribute
-
encodeUnsignedIntegerAttribute
-
encodeDoubleAttribute
-
decodeInt
-
decodeLong
-
xmlEscape
-
xmlEscapeAttribute
-
xmlEscapeWriter
- Throws:
IOException
-
getXmlHandler
-