Class XmlTreeBuilder.NamespaceChange

java.lang.Object
org.jsoup.parser.XmlTreeBuilder.NamespaceChange
Enclosing class:
XmlTreeBuilder

private static final class XmlTreeBuilder.NamespaceChange extends Object
Tracks namespace binding changes within element scopes. Each scope starts with a shared marker, followed by a change record for each namespace declaration. When the scope closes, the change records are applied in reverse to restore the parent bindings.
  • Field Details

    • prefix

      private final String prefix
    • previousValue

      private final String previousValue
  • Constructor Details

    • NamespaceChange

      private NamespaceChange(String prefix, String previousValue)
      Creates a namespace change; a null previous value means the prefix was previously unbound.
  • Method Details

    • restore

      private void restore(Map<String,String> namespaceBindings)
      Restores the binding that was active before this change.