Package ghidra.app.util.xml
Class DataTypesXmlMgr
java.lang.Object
ghidra.app.util.xml.DataTypesXmlMgr
This manager is responsible for reading and writing datatypes in XML.
-
Constructor Summary
ConstructorsConstructorDescriptionDataTypesXmlMgr(DataTypeManager dataManager, MessageLog log) Constructs a new data types XML manager. -
Method Summary
Modifier and TypeMethodDescriptionvoidread(XmlPullParser parser, TaskMonitor monitor) Reads the datatypes encoded in XML from the specified XML parser and recreates them in a datatype manager.voidwrite(XmlWriter writer, TaskMonitor monitor) Writes datatypes into XML using the specified XML writer.static voidwriteAsXMLForDebug(DataTypeManager dataManager, String outputFilename) Output data types in XML format for debugging purposes.
-
Constructor Details
-
DataTypesXmlMgr
Constructs a new data types XML manager.- Parameters:
dataManager- the data type manager to read from or write tolog- the message log for recording datatype warnings
-
-
Method Details
-
read
public void read(XmlPullParser parser, TaskMonitor monitor) throws SAXParseException, CancelledException Reads the datatypes encoded in XML from the specified XML parser and recreates them in a datatype manager.- Parameters:
parser- the XML parsermonitor- the task monitor- Throws:
SAXParseException- if an XML parse error occursCancelledException- if the user cancels the read operation
-
write
Writes datatypes into XML using the specified XML writer.- Parameters:
writer- the XML writermonitor- the task monitor- Throws:
CancelledException- if the user cancels the write operation
-
writeAsXMLForDebug
public static void writeAsXMLForDebug(DataTypeManager dataManager, String outputFilename) throws IOException Output data types in XML format for debugging purposes. NOTE: There is no support for reading the XML produced by this method.- Parameters:
dataManager- the data type manageroutputFilename- name of the output file- Throws:
IOException- if there was a problem writing to the file
-