public class XMLPropertyListParser extends Object
| Constructor and Description |
|---|
XMLPropertyListParser() |
| Modifier and Type | Method and Description |
|---|---|
static DocumentBuilder |
getDocBuilder()
Gets a
DocumentBuilder to parse an XML property list. |
static NSObject |
parse(byte[] bytes)
Parses an XML property list from a byte array.
|
static NSObject |
parse(Document doc)
Parses a property list from an XML document.
|
static NSObject |
parse(File f)
Parses an XML property list file.
|
static NSObject |
parse(InputStream is)
Parses an XML property list from an input stream.
|
static NSObject |
parse(Path path)
Parses an XML property list file.
|
static NSObject |
parse(Reader reader)
Parses an XML property list from a
Reader. |
public static DocumentBuilder getDocBuilder() throws ParserConfigurationException
DocumentBuilder to parse an XML property list.
As DocumentBuilder instance are not thread-safe a new DocumentBuilder is generated for each request.DocumentBuilder that can parse property lists without an internet connection.ParserConfigurationException - If a document builder for parsing a XML property list
could not be created. This should not occur.public static NSObject parse(File f) throws ParserConfigurationException, IOException, SAXException, PropertyListFormatException, ParseException
f - The XML property list file.NSDictionary but can also be a NSArray.ParserConfigurationException - If a document builder for parsing an XML property list
could not be created. This should not occur.IOException - If any I/O error occurs while reading the file.SAXException - If any parse error occurs.PropertyListFormatException - If the given property list has an invalid format.ParseException - If a date string could not be parsed.DocumentBuilder.parse(java.io.File)public static NSObject parse(Path path) throws ParserConfigurationException, IOException, SAXException, PropertyListFormatException, ParseException
path - The XML property list file path.NSDictionary but can also be a NSArray.ParserConfigurationException - If a document builder for parsing an XML property list
could not be created. This should not occur.IOException - If any I/O error occurs while reading the file.SAXException - If any parse error occurs.PropertyListFormatException - If the given property list has an invalid format.ParseException - If a date string could not be parsed.DocumentBuilder.parse(java.io.File)public static NSObject parse(byte[] bytes) throws ParserConfigurationException, ParseException, SAXException, PropertyListFormatException, IOException
bytes - The byte array containing the property list's data.NSDictionary but can also be a NSArray.ParserConfigurationException - If a document builder for parsing an XML property list
could not be created. This should not occur.IOException - If any I/O error occurs while reading the file.SAXException - If any parse error occurs.PropertyListFormatException - If the given property list has an invalid format.ParseException - If a date string could not be parsed.public static NSObject parse(InputStream is) throws ParserConfigurationException, IOException, SAXException, PropertyListFormatException, ParseException
is - The input stream pointing to the property list's data.NSDictionary but can also be a NSArray.ParserConfigurationException - If a document builder for parsing an XML property list
could not be created. This should not occur.IOException - If any I/O error occurs while reading the file.SAXException - If any parse error occurs.PropertyListFormatException - If the given property list has an invalid format.ParseException - If a date string could not be parsed.DocumentBuilder.parse(java.io.InputStream)public static NSObject parse(Reader reader) throws ParserConfigurationException, IOException, SAXException, PropertyListFormatException, ParseException
Reader.
This method does not close the specified reader.reader - The reader providing the property list's data.NSDictionary but can also be a NSArray.ParserConfigurationException - If a document builder for parsing an XML property list
could not be created. This should not occur.IOException - If any I/O error occurs while reading the file.SAXException - If any parse error occurs.PropertyListFormatException - If the given property list has an invalid format.ParseException - If a date string could not be parsed.DocumentBuilder.parse(java.io.InputStream)public static NSObject parse(Document doc) throws PropertyListFormatException, IOException, ParseException
doc - The XML document.IOException - If any I/O error occurs while reading the file.PropertyListFormatException - If the given property list has an invalid format.ParseException - If a date string could not be parsed.Copyright © 2022. All rights reserved.