continue; newObj.read(ele, docRoot);
continue; newObj.read(ele, docRoot);
public static LinkedList getElementLinkedList(Class classType, Element root, String name, URL docRoot) { if (root == null) return null; //Do not process if not a LoadableObject if (!ReadableXMLElement.class.isAssignableFrom(classType)) { return null; } NodeList nl = root.getChildNodes(); LinkedList elementCache = new LinkedList(); int size = nl.getLength(); for (int i = 0; i < size; i++) { Node node = nl.item(i); if (!(node instanceof Element)) continue; Element ele = (Element)node; if (!ele.getTagName().equals(name)) continue; ReadableXMLElement newObj = null; try { newObj = (ReadableXMLElement)classType.newInstance(); } catch (Exception e) { e.printStackTrace(); continue; } newObj.read(ele, docRoot); elementCache.addLast(newObj); } return elementCache; }
continue; newObj.read(ele, docRoot);
continue; newObj.read(ele, docRoot);
/** * Returns the first ReadableXMLElement with the given name */ public static ReadableXMLElement getElement(Class classType, Element root, String name, URL docRoot) { if (root == null) return null; //Do not process if not a LoadableObject if (!ReadableXMLElement.class.isAssignableFrom(classType)) { return null; } NodeList nl = root.getChildNodes(); int size = nl.getLength(); for (int i = 0; i < size; i++) { Node node = nl.item(i); if (!(node instanceof Element)) continue; Element ele = (Element)node; if (!ele.getTagName().equals(name)) continue; ReadableXMLElement newObj = null; try { newObj = (ReadableXMLElement)classType.newInstance(); } catch (Exception e) { e.printStackTrace(); continue; } newObj.read(ele, docRoot); if (newObj == null) continue; return newObj; } return null; }
continue; newObj.read(ele, docRoot);
continue; newObj.read(ele, docRoot);
continue; newObj.read(ele, docRoot);
continue; newObj.read(ele, docRoot);
continue; newObj.read(ele, docRoot);
try { newObj = (ReadableXMLElement)classType.newInstance(); } catch (Exception e) { e.printStackTrace(); continue; } newObj.read(ele, docRoot);
continue; newObj.read(ele, docRoot);
continue; newObj.read(ele, docRoot);
continue; newObj.read(ele, docRoot);
try { newObj = (ReadableXMLElement)classType.newInstance(); } catch (Exception e) { e.printStackTrace(); continue; } newObj.read(ele, docRoot);