Class EditContext

java.lang.Object
io.jenkins.plugins.xmleditor.core.edit.EditContext

public final class EditContext extends Object
What operations need to know about the document they modify: encoding, line separator, style.
  • Constructor Details

    • EditContext

      public EditContext(LDocument doc)
  • Method Details

    • recordOldValue

      public void recordOldValue(String value)
      Records the value a node had before the current operation touched it.
    • stringValue

      public static String stringValue(LItem item)
      XPath string-value: text of an element and its descendants, value of attributes, text and comments.
    • doc

      public LDocument doc()
    • lineSeparator

      public String lineSeparator()
    • indentation

      public IndentationStyle indentation()
      Indentation conventions, detected once from the document as it was before the first insertion.
    • escapeText

      public String escapeText(String value)
      Escapes element content; line breaks follow the file's line separator.
    • escapeAttribute

      public String escapeAttribute(String value, char quote)
    • prevailingQuote

      public char prevailingQuote()
      The quote used by most attributes of the document (" when there are none or on a tie).