}
private static final UrlConfig parseUrlConfig(Document document) {
Element elem = DomUtils.getChildElementByName(document.getDocumentElement(), "url-config");
if(elem == null)
return new UrlConfig();
Boolean urlEncodeUrls = null;
Boolean htmlAmpEntity = null;
String templatedUrlFormatterClass = null;
String tmp = null;
tmp = DomUtils.getChildElementText(elem, "url-encode-urls");
if(tmp != null)
urlEncodeUrls = new Boolean(Boolean.parseBoolean(tmp));
tmp = DomUtils.getChildElementText(elem, "html-amp-entity");
if(tmp != null)
htmlAmpEntity = new Boolean(Boolean.parseBoolean(tmp));
templatedUrlFormatterClass = DomUtils.getChildElementText(elem, "templated-url-formatter-class");
return new UrlConfig(urlEncodeUrls, htmlAmpEntity, templatedUrlFormatterClass);
}