Skip to content

Commit c48d54f

Browse files
committed
Make parse(Document) public
1 parent b5e14e1 commit c48d54f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/com/dd/plist/XMLPropertyListParser.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public static NSObject parse(File f) throws ParserConfigurationException, IOExce
108108

109109
Document doc = docBuilder.parse(f);
110110

111-
return parseDocument(doc);
111+
return parse(doc);
112112
}
113113

114114
/**
@@ -146,19 +146,19 @@ public static NSObject parse(InputStream is) throws ParserConfigurationException
146146

147147
Document doc = docBuilder.parse(is);
148148

149-
return parseDocument(doc);
149+
return parse(doc);
150150
}
151151

152152
/**
153-
* Parses the XML document by generating the appropriate NSObjects for each XML node.
153+
* Parses a property list from an XML document.
154154
*
155155
* @param doc The XML document.
156156
* @return The root NSObject of the property list contained in the XML document.
157157
* @throws java.io.IOException If any IO error occurs while reading the file.
158158
* @throws com.dd.plist.PropertyListFormatException If the given property list has an invalid format.
159159
* @throws java.text.ParseException If a date string could not be parsed.
160160
*/
161-
private static NSObject parseDocument(Document doc) throws PropertyListFormatException, IOException, ParseException {
161+
public static NSObject parse(Document doc) throws PropertyListFormatException, IOException, ParseException {
162162
DocumentType docType = doc.getDoctype();
163163
if (docType == null) {
164164
if (!doc.getDocumentElement().getNodeName().equals("plist")) {

0 commit comments

Comments
 (0)