if (XmlUtils.findFirstElement("/beans/view-controller[@path='"
+ prefixedUrl + "']", document.getDocumentElement()) == null) {
final Element sibling = XmlUtils
.findFirstElement("/beans/view-controller",
document.getDocumentElement());
final Element view = new XmlElementBuilder(
"mvc:view-controller", document).addAttribute("path",
prefixedUrl).build();
if (sibling != null) {
sibling.getParentNode().insertBefore(view, sibling);
}