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(byte[] bytes,
boolean withLineInformation)
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(File f,
boolean withLineInformation)
Parses an XML property list file.
|
static NSObject |
parse(InputStream is)
Parses an XML property list from an input stream.
|
static NSObject |
parse(InputStream is,
boolean withLineInformation)
Parses an XML property list from an input stream.
|
static NSObject |
parse(Path path)
Parses an XML property list file.
|
static NSObject |
parse(Path path,
boolean withLineInformation)
Parses an XML property list file.
|
static NSObject |
parse(Reader reader)
Parses an XML property list from a
Reader. |
static NSObject |
parse(Reader reader,
boolean withLineInformation)
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
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 XML parsing error occurs.PropertyListFormatException - If the given property list has an invalid format.DocumentBuilder.parse(java.io.File)public static NSObject parse(Path path) throws ParserConfigurationException, IOException, SAXException, PropertyListFormatException
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 XML parsing error occurs.PropertyListFormatException - If the given property list has an invalid format.DocumentBuilder.parse(java.io.File)public static NSObject parse(byte[] bytes) throws ParserConfigurationException, 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 XML parsing error occurs.PropertyListFormatException - If the given property list has an invalid format.public static NSObject parse(InputStream is) throws ParserConfigurationException, IOException, SAXException, PropertyListFormatException
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 XML parsing error occurs.PropertyListFormatException - If the given property list has an invalid format.DocumentBuilder.parse(java.io.InputStream)public static NSObject parse(Reader reader) throws ParserConfigurationException, IOException, SAXException, PropertyListFormatException
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 XML parsing error occurs.PropertyListFormatException - If the given property list has an invalid format.DocumentBuilder.parse(java.io.InputStream)public static NSObject parse(File f, boolean withLineInformation) throws ParserConfigurationException, IOException, SAXException, PropertyListFormatException
f - The XML property list file.withLineInformation - If set to true, the parser will try to collect line information and store it
in the parsed object's location information
(See NSObject.getLocationInformation()).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 XML parsing error occurs.PropertyListFormatException - If the given property list has an invalid format.DocumentBuilder.parse(java.io.File)public static NSObject parse(Path path, boolean withLineInformation) throws ParserConfigurationException, IOException, SAXException, PropertyListFormatException
path - The XML property list file path.withLineInformation - If set to true, the parser will try to collect line information and store it
in the parsed object's location informationNSDictionary 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 XML parsing error occurs.PropertyListFormatException - If the given property list has an invalid format.DocumentBuilder.parse(java.io.File)public static NSObject parse(byte[] bytes, boolean withLineInformation) throws ParserConfigurationException, SAXException, PropertyListFormatException, IOException
bytes - The byte array containing the property list's data.withLineInformation - If set to true, the parser will try to collect line information and store it
in the parsed object's location informationNSDictionary 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 XML parsing error occurs.PropertyListFormatException - If the given property list has an invalid format.public static NSObject parse(InputStream is, boolean withLineInformation) throws ParserConfigurationException, IOException, SAXException, PropertyListFormatException
is - The input stream pointing to the property list's data.withLineInformation - If set to true, the parser will try to collect line information and store it
in the parsed object's location informationNSDictionary 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 XML parsing error occurs.PropertyListFormatException - If the given property list has an invalid format.DocumentBuilder.parse(java.io.InputStream)public static NSObject parse(Reader reader, boolean withLineInformation) throws ParserConfigurationException, IOException, SAXException, PropertyListFormatException
Reader.
This method does not close the specified reader.reader - The reader providing the property list's data.withLineInformation - If set to true, the parser will try to collect line information and store it
in the parsed object's location informationNSDictionary 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 XML parsing error occurs.PropertyListFormatException - If the given property list has an invalid format.DocumentBuilder.parse(java.io.InputStream)public static NSObject parse(Document doc) throws PropertyListFormatException, IOException
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.Copyright © 2024. All rights reserved.