Package ghidra.app.util.xml
Class DataTypesXmlMgr
- java.lang.Object
-
- ghidra.app.util.xml.DataTypesXmlMgr
-
public class DataTypesXmlMgr extends java.lang.Object
This manager is responsible for reading and writing datatypes in XML.
-
-
Constructor Summary
Constructors Constructor Description DataTypesXmlMgr(DataTypeManager dataManager, MessageLog log)
Constructs a new data types XML manager.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
read(XmlPullParser parser, TaskMonitor monitor)
Reads the datatypes encoded in XML from the specified XML parser and recreates them in a datatype manager.void
write(XmlWriter writer, TaskMonitor monitor)
Writes datatypes into XML using the specified XML writer.static void
writeAsXMLForDebug(DataTypeManager dataManager, java.lang.String outputFilename)
Output data types in XML format for debugging purposes.
-
-
-
Constructor Detail
-
DataTypesXmlMgr
public DataTypesXmlMgr(DataTypeManager dataManager, MessageLog log)
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 Detail
-
read
public void read(XmlPullParser parser, TaskMonitor monitor) throws org.xml.sax.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:
org.xml.sax.SAXParseException
- if an XML parse error occursCancelledException
- if the user cancels the read operation
-
write
public void write(XmlWriter writer, TaskMonitor monitor) throws CancelledException
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, java.lang.String outputFilename) throws java.io.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:
java.io.IOException
- if there was a problem writing to the file
-
-