|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.plist.io.PropertyListWriter
net.sf.plist.io.domxml.DOMXMLWriter
public class DOMXMLWriter
Serializes a tree consisting of NSObject
s to an XML property list
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.sf.plist.io.PropertyListWriter |
---|
PropertyListWriter.Format |
Field Summary | |
---|---|
protected DocumentBuilder |
db
The DocumentBuilder |
protected static DocumentBuilderFactory |
dbf
The DocumentBuilderFactory |
protected Document |
doc
The XML document |
static String |
DOCTYPE_PUBLIC
The public declaration of the document type |
static String |
DOCTYPE_SYSTEM
The URL of the document type |
static String |
VERSION
Version of this XML format |
Fields inherited from class net.sf.plist.io.PropertyListWriter |
---|
defaultFormat, root |
Constructor Summary | |
---|---|
DOMXMLWriter(NSObject root)
|
Method Summary | |
---|---|
protected Element |
generateArray(NSArray array)
Convert an NSArray to an XML element |
protected Element |
generateBoolean(NSBoolean bool)
Convert an NSBoolean to an XML element |
protected Element |
generateData(NSData data)
Convert an NSData to an XML element |
protected Element |
generateDate(NSDate date)
Convert an NSDate to an XML element |
protected Element |
generateDictionary(NSDictionary dictionary)
Convert an NSDictionary to an XML element |
protected Element |
generateInteger(NSInteger integer)
Convert an NSInteger to an XML element |
protected Element |
generateKey(String name)
Creates a key XML element |
protected Element |
generateNode(NSObject obj)
Convert an NSObject to an XML element |
protected Element |
generateReal(NSReal real)
Convert an NSReal to an XML element |
protected Element |
generateString(NSString string)
Convert an NSString to an XML element |
void |
write(OutputStream stream)
Write the property list to a stream |
void |
write(OutputStream stream,
boolean indent)
Convert a tree to a XML property list and write it to a stream |
Methods inherited from class net.sf.plist.io.PropertyListWriter |
---|
write, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Document doc
protected static final DocumentBuilderFactory dbf
protected final DocumentBuilder db
public static final String DOCTYPE_PUBLIC
public static final String DOCTYPE_SYSTEM
public static final String VERSION
Constructor Detail |
---|
public DOMXMLWriter(NSObject root) throws ParserConfigurationException
ParserConfigurationException
PropertyListWriter.PropertyListWriter(NSObject)
Method Detail |
---|
public void write(OutputStream stream) throws DOMException, PropertyListException, IOException
write
in class PropertyListWriter
stream
- the stream to write the property list to
PropertyListException
- when generating the property list fails
IOException
- when writing to the stream fails
DOMException
public void write(OutputStream stream, boolean indent) throws DOMException, PropertyListException, IOException
stream
- the stream to write the property list toindent
- whether the resulting XML file should be indented
DOMException
- when an error occurred generating the XML document
PropertyListException
- when generating the property list fails
IOException
- if an I/O error occursprotected Element generateNode(NSObject obj) throws PropertyListException
obj
- the NSObject to convert
PropertyListException
- when generating the property list failsprotected Element generateArray(NSArray array) throws DOMException, PropertyListException
array
- the NSArray to convert
PropertyListException
- when generating the property list fails
DOMException
protected Element generateBoolean(NSBoolean bool)
bool
- the NSBoolean to convert
PropertyListException
- when generating the property list failsprotected Element generateData(NSData data)
data
- the NSData to convert
PropertyListException
- when generating the property list failsprotected Element generateDate(NSDate date)
date
- the NSDate to convert
PropertyListException
- when generating the property list failsprotected Element generateDictionary(NSDictionary dictionary) throws DOMException, PropertyListException
dictionary
- the NSDictionary to convert
PropertyListException
- when generating the property list fails
DOMException
protected Element generateReal(NSReal real)
real
- the NSReal to convert
PropertyListException
- when generating the property list failsprotected Element generateInteger(NSInteger integer)
integer
- the NSInteger to convert
PropertyListException
- when generating the property list failsprotected Element generateString(NSString string)
string
- the NSString to convert
PropertyListException
- when generating the property list failsprotected Element generateKey(String name)
name
- the name of the key
PropertyListException
- when generating the property list fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |