Collapsing XML tags

Collapsing XML tags

1
NewbieNewbie
1

    Dec 14, 2005#1

    Is there any way to collapse/expand specific XML tags without having to click each individual one?

    I have a large file that contains <person> and <group> and <membership> tags. I'd like to collapse just the person tags (several thousand) and see the details in the remaining <group> and <membership> tags. Since there are SO many person tags, I don't want to collapse each manually. :roll:

    If there isn't a menu command that will do it, how can I create a macro that will find and collapse the <person> tags? :?:

    6,681583
    Grand MasterGrand Master
    6,681583

      Dec 14, 2005#2

      Not possible neither via a menu function nor a macro.

      But you could do following:

      Open your wordfile and copy the language settings for XML to a second, higher language number. In the second language definition for XML remove the open and close fold strings for group and membership and save the wordfile. You have to close and restart UltraEdit now.

      /L6"XML - All tags" XML_LANG Noquote Block Comment On = <!-- Block Comment Off = --> File Extensions = XML XUL XSD XSL XSLT
      :
      :

      /L12"XML - Person tags" XML_LANG Noquote Block Comment On = <!-- Block Comment Off = --> File Extensions = XML XUL XSD XSL XSLT
      :
      :

      After opening the XML file again it will be highlighted by default with the first language definition "XML - All tags". Select now from the "View - View As" menu the second highlighting definition for XML - "XML - Person tags".

      Finally use the "Collapse All" function from the "View - Hide/Show Lines" menu to fold all person tags.
      Best regards from an UC/UE/UES for Windows user from Austria