public void loadSocialsElement(IXMLElement xml) throws Exception { String src = xml.getAttribute(PROPERTY_SRC, null); // If the passed xml element just points to a file if (src != null) { IXMLParser xmp = new StdXMLParser(); xmp.setBuilder(new StdXMLBuilder()); xmp.setValidator(new NonValidator()); xmp.setReader(StdXMLReader.fileReader(src)); xml = (XMLElement) xmp.parse(); xmp = null; } int count = 0; for (Enumeration enu = xml.getChildrenNamed(Social.MARKUP).elements(); enu.hasMoreElements(); count++) { IXMLElement nxt = (IXMLElement) enu.nextElement(); this.socials.addCommand(Social.loadSocial(nxt)); } }