Menu

Simple XML editing... how ?

2007-06-15
2012-11-13
  • Nobody/Anonymous

    How does work Split lines ?  It doesn illogical thing to me - or i perhaps can't understand it.
    How should one customize Tidy ? its XML indent could be ok, if it did not changed characters to &-#; entities.

    I have a jabber roster and i need migrate settings from one transport to another.

    So i basically have to
    1. record macro "F3, right-arrow, enter" (F3 searching for closing tag of the tag, i need to split lines upon)
    2. after that i would need to grep all lines not containing specific substring - transport domain name.
    3. Then several text substitutions
    4. at the result i would have an XML to directly feed into XMPP server.

    But it all seems to be an overkill!

    All i need is to grep XML tags and then replace one substring in them for another!
    PErhaps i would better try to learn IE DOM API, XPath, etc...
    But i wonder why such simple functions are not meet in GUI ?

     
    • MJG

      MJG - 2007-06-18

      Split lines is meant to insert line breaks (e.g., CR/LF pairs) at the word-wrap length, either based on the window width currently used by Notepad++ or by the number stored in the clipboard.   See the associated help file that came with your distribution, probably in <Notepad++ installation directory>\plugins\NPPTextFX.  In other words, it is not what you are looking for.

      There's a pretty-print option to Tidy that you can configure by creating a custom htmltidy.cfg file, I think.  You might be able to keep it from converting characters to &-#; via a setting.  See the TextFX > TextFX HTML Tidy menu for places to go and docs to see.

      The last option would be to use regex (regular expressions).  Scintilla's implementation is limited, though.  There's a joke that goes something like this:

      You have a problem.  You say, "I know! I'll use regular expressions!"  Now you have _two_ problems.

      --Joel