@Deprecated(forRemoval = true)
  @SuppressWarnings("DeprecatedIsStillUsed")
  public static XmlElementPattern.Capture withDom(ElementPattern<? extends DomElement> pattern) {
    return new XmlElementPattern.Capture().with(new PatternCondition<>("tagWithDom") {
      @Override
      public boolean accepts(@NotNull XmlElement xmlElement, ProcessingContext context) {
        DomManager manager = DomManager.getDomManager(xmlElement.getProject());
        if (xmlElement instanceof XmlAttribute) {
          return pattern.accepts(manager.getDomElement((XmlAttribute)xmlElement), context);
        }
        return xmlElement instanceof XmlTag && pattern.accepts(manager.getDomElement((XmlTag)xmlElement), context);
      }
    });
  }
@Deprecated(forRemoval = true)
  @SuppressWarnings("DeprecatedIsStillUsed")
  public static XmlElementPattern.Capture withDom(ElementPattern<? extends DomElement> pattern)