code: private static BindingConfiguration parseDocument(Document doc) {
  
          BindingConfiguration result = new BindingConfiguration();
  
          Element docRoot = doc.getDocumentElement();
          for (Node next : new IterableNodeList(docRoot.getChildNodes())) {
              if (Node.ELEMENT_NODE == next.getNodeType()) {
                  Element element = (Element) next;
  
                  if (BINDINGS_NAMESPACE.equals(element.getNamespaceURI())
                          && "provider".equals(element.getLocalName())) {
  
                      Provider provider = parseProviderElement(element);
                      result.addProvider(provider);
                  }
  
                  if (BINDINGS_NAMESPACE.equals(element.getNamespaceURI())
                          && "extension".equals(element.getLocalName())) {
  
                      Extension<?> extension = parseBinderExtensionElement(element);
                      result.addExtension(extension);
                  }
                  
                  if (BINDINGS_NAMESPACE.equals(element.getNamespaceURI())
                          && "binding".equals(element.getLocalName())) {
  
                      BindingConfigurationEntry binding = parseBindingConfigurationEntryElement(element);
                      result.addBindingEntry(binding);
                  }
              }
          }
          return result;
      }
docs: Walk the parsed {@link Document} and produce a {@link BindingConfiguration}
  @param doc Document being Parsed
  @return The resultant {@link BindingConfiguration}