@Override
  public XmlDocument getDocument() {
    PsiElement child = getFirstChild();
    while (child != null) {
      if (child instanceof XmlDocument) return (XmlDocument)child;
      child = child.getNextSibling();
    }

    return null;
  }
@Override
  public XmlDocument getDocument()