ISVNLogMessageChangePath[] logMessageChangePath = new ISVNLogMessageChangePath[msgNode.getChildNodes().getLength()]; for (int j = 0; j < msgNode.getChildNodes().getLength();j++) { Node pathNode = msgNode.getChildNodes().item(j);
ISVNLogMessageChangePath[] logMessageChangePath = new ISVNLogMessageChangePath[pathsNode.getChildNodes().getLength()]; for (int j = 0; j < pathsNode.getChildNodes().getLength();j++) { Node pathNode = pathsNode.getChildNodes().item(j);
	public static CmdLineLogMessage[] createLogMessages(String cmdLineResults) throws SVNClientException {		Collection logMessages = new ArrayList();				try {			// Create a builder factory			DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();			factory.setValidating(false);    			// Create the builder and parse the file			InputSource source = new InputSource(new StringReader(cmdLineResults));			Document doc = factory.newDocumentBuilder().parse(source);						NodeList nodes = doc.getElementsByTagName("logentry");						for(int i = 0; i < nodes.getLength(); i++){				Node logEntry = nodes.item(i);								Node authorNode = logEntry.getFirstChild();				Node dateNode = authorNode.getNextSibling();                Node pathsNode = dateNode.getNextSibling();				Node msgNode = dateNode.getNextSibling();				Node revisionAttribute = logEntry.getAttributes().getNamedItem("revision");                SVNRevision.Number rev = Helper.toRevNum(revisionAttribute.getNodeValue());				String author = authorNode.getFirstChild().getNodeValue();				Date date = Helper.convertXMLDate(dateNode.getFirstChild().getNodeValue());				Node msgTextNode = msgNode.getFirstChild();                String msg;				if(msgTextNode != null)					msg = msgTextNode.getNodeValue();				else					msg = "";                                ISVNLogMessageChangePath[] logMessageChangePath = new ISVNLogMessageChangePath[msgNode.getChildNodes().getLength()];                for (int j = 0; j < msgNode.getChildNodes().getLength();j++) {                	Node pathNode = msgNode.getChildNodes().item(j);                    String path = pathNode.getFirstChild().getNodeValue();                    NamedNodeMap attributes = pathNode.getAttributes();                    char action = attributes.getNamedItem("action").getNodeValue().charAt(0);                    Node copyFromPathNode = attributes.getNamedItem("copyfrom-path");                    Node copyFromRevNode = attributes.getNamedItem("copyfrom-rev");                    String copyFromPath = null;                    if (copyFromPathNode != null) {                        copyFromPath = copyFromPathNode.getNodeValue();                    }                    SVNRevision.Number copyFromRev = null;                    if (copyFromRevNode != null) {                        copyFromRev = Helper.toRevNum(copyFromRevNode.getNodeValue());                    }                    logMessageChangePath[j] = new SVNLogMessageChangePath(                            path, copyFromRev, copyFromPath, action);                }                                CmdLineLogMessage logMessage = new CmdLineLogMessage(rev, author, date, msg, logMessageChangePath);				logMessages.add(logMessage);							}					} catch (Exception e) {			throw new SVNClientException(e);		} 				return (CmdLineLogMessage[]) logMessages.toArray(new CmdLineLogMessage[logMessages.size()]);				}