• Login
Community
  • Login

XML some... Highlight

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
16 Posts 3 Posters 5.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 오
    오바마
    last edited by 오바마 Nov 28, 2018, 3:21 PM Nov 28, 2018, 3:20 PM

    sorry, I do not know its name and function clearly

    I am (trying to) handling XML file
    I remember that when I put my cursor at the start of one Element
    then Notepad++ automatically shows me (highlighted) the end of that Element.

    something like this;

    <myElemeStartssHere…> <-- my cursor here
    Bulah…
    Bulah…
    **</myElemenEndsHere…> ** <- Highlights, Automatically

    How can I achieve it ?

    Thanks

    1 Reply Last reply Reply Quote 0
    • P
      PeterJones
      last edited by PeterJones Nov 28, 2018, 3:32 PM Nov 28, 2018, 3:30 PM

      • Your start and end tags need to match (your example did not match).

          <someTag>
              blah
              blah
          **</someTag>
        
      • Your cursor needs to be inside the tag, not after the >

      • Settings > Preferences > Highlighting > Highlight Matching Tags > ☑ Enable must be enabled.

      If my cursor is anywhere between either of the <> pairs, it will highlight both the <someTag> and the </someTag>.

      오 1 Reply Last reply Nov 28, 2018, 3:51 PM Reply Quote 2
      • 오
        오바마
        last edited by Nov 28, 2018, 3:47 PM

        thank for Reply

        yes, I have checked what you said (actually, they are there and done)
        no, I do not have what I wanted.

        the first post have changed under not my control - it just sucks.
        here is the correct XML contents of mine (of course, some of them)

        <SettingsGroup Id=““QAVerificationSettings””>
        <Setting Id=““RegExRules””>True</Setting>
        <Setting Id=““RegExRules0"”>
        <RegExRule xmlns:i=”“http://www.w3.org/2001/XMLSchema-instance”" xmlns=““http://schemas.datacontract.org/2004/07/Sdl.Verification.QAChecker.RegEx””><Description>000000000</Description><IgnoreCase>false</IgnoreCase><RegExSource></RegExSource><RegExTarget>[0-9]{1,}\s%</RegExTarget><RuleCondition>TargetOnly</RuleCondition></RegExRule></Setting>
        <Setting Id=““RegExRules1"”>
        <RegExRule xmlns:i=”“http://www.w3.org/2001/XMLSchema-instance”" xmlns=““http://schemas.datacontract.org/2004/07/Sdl.Verification.QAChecker.RegEx””><Description>111111111</Description><IgnoreCase>false</IgnoreCase><RegExSource></RegExSource><RegExTarget>[0-9]{1,}\s%</RegExTarget><RuleCondition>TargetOnly</RuleCondition></RegExRule></Setting>
        <Setting Id=““CheckTradeMarksSeverity””>1</Setting>
        </SettingsGroup>

        thank

        1 Reply Last reply Reply Quote 0
        • 오
          오바마 @PeterJones
          last edited by Nov 28, 2018, 3:51 PM

          @PeterJones

          nice
          yes
          that’s what I wanted

          unfortunately, I still have in trouble

          E 1 Reply Last reply Nov 28, 2018, 3:56 PM Reply Quote 0
          • E
            Eko palypse @오바마
            last edited by Nov 28, 2018, 3:56 PM

            @오바마

            make sure that you have enabled highlight matching tags under
            settings->preferences->highlighting

            Eko

            오 1 Reply Last reply Nov 28, 2018, 4:08 PM Reply Quote 0
            • 오
              오바마 @Eko palypse
              last edited by Nov 28, 2018, 4:08 PM

              @Eko-palypse

              thanks comment !

              yes, like I wrote earlier

              under “Highlight Matching Tags”

              checked “Enable”
              checked “Highlight tag attributes”
              checked “Highlight comment/php/asp zone”

              1 Reply Last reply Reply Quote 0
              • E
                Eko palypse
                last edited by Nov 28, 2018, 4:14 PM

                Sorry for confusion but I haven’t seen that this was already mentioned.
                In fact, when I answered I didn’t see any answer at all. Strange.

                @오바마
                Could it be that the xml file is somehow corrupted?
                What if you just copy and paste your example into a new document
                and set the xml language? Does it work?

                Eko

                오 1 Reply Last reply Nov 28, 2018, 4:19 PM Reply Quote 0
                • 오
                  오바마 @Eko palypse
                  last edited by Nov 28, 2018, 4:19 PM

                  @Eko-palypse

                  thank reply

                  yes

                  now I am in the middle of studying
                  so
                  I copied just some couple of lines (paired nicely for sure)
                  from there into New Notepad++ instances (so no files, just made sure it is xml format using “Language>XML” checked)

                  Does it make problem here ?

                  E 1 Reply Last reply Nov 28, 2018, 4:23 PM Reply Quote 0
                  • E
                    Eko palypse @오바마
                    last edited by Nov 28, 2018, 4:23 PM

                    @오바마

                    that’s where the xml tools plugin might be useful.
                    It has a function validate xml which would point you to the place
                    where it discovered the issue. Might be not 100% accurate but
                    should give enough info to identify the problematic area.

                    Eko

                    오 1 Reply Last reply Nov 28, 2018, 4:27 PM Reply Quote 1
                    • 오
                      오바마 @Eko palypse
                      last edited by Nov 28, 2018, 4:27 PM

                      @Eko-palypse

                      plugIn ? what is that ?
                      do I have to use it ?
                      I will use it, If I have to.

                      BUT
                      I remember that I (Notepad++) made nicely highlighted paired element when I put my caret there.

                      Thanks.

                      1 Reply Last reply Reply Quote 0
                      • P
                        PeterJones
                        last edited by Nov 28, 2018, 7:04 PM

                        You might want to try to simplify. Take my example document

                        <someTag>
                            blah
                            blah
                        </someTag>
                        

                        Paste it into a new Notepad++ file. With language at default / plain text (Language > Normal Text), it does not show matches for me. If I change the language to XML or HTML, then it does show matches.

                        The same thing happened when I used your snippet:

                        <SettingsGroup Id="“QAVerificationSettings”">
                        <Setting Id="“RegExRules”">True</Setting>
                        <Setting Id="“RegExRules0"”>
                        <RegExRule xmlns:i=""http://www.w3.org/2001/XMLSchema-instance“” xmlns=""http://schemas.datacontract.org/2004/07/Sdl.Verification.QAChecker.RegEx“”><Description>000000000</Description><IgnoreCase>false</IgnoreCase><RegExSource></RegExSource><RegExTarget>[0-9]{1,}\s%</RegExTarget><RuleCondition>TargetOnly</RuleCondition></RegExRule></Setting>
                        <Setting Id="“RegExRules1"”>
                        <RegExRule xmlns:i=""http://www.w3.org/2001/XMLSchema-instance“” xmlns=""http://schemas.datacontract.org/2004/07/Sdl.Verification.QAChecker.RegEx“”><Description>111111111</Description><IgnoreCase>false</IgnoreCase><RegExSource></RegExSource><RegExTarget>[0-9]{1,}\s%</RegExTarget><RuleCondition>TargetOnly</RuleCondition></RegExRule></Setting>
                        <Setting Id="“CheckTradeMarksSeverity”">1</Setting>
                        </SettingsGroup>
                        

                        It might also have to do with your theme settings (Settings > Style Configurator, look at the Select Theme at the top of the dialog box): are you using the default, or have you edited your colors for the default theme, or do you have another theme selected? Maybe due to your style settings, you just cannot see the highlighting that’s there.

                        You might consider doing a screenshot with your cursor inside the <someTag> from my example (like between some and Tag, posting to imgur, and linking by copying the “direct link” and put it here using the syntax ![](https://i.imgur.com/0Mon4gO.png), but replacing my image id with yours. (Make sure you copy the link that uses the i.imgur.com, so it’s directly to the image, rather than imgur’s wrapper page)

                        오 1 Reply Last reply Nov 29, 2018, 12:15 AM Reply Quote 1
                        • 오
                          오바마 @PeterJones
                          last edited by Nov 29, 2018, 12:15 AM

                          @PeterJones

                          Wow
                          I just saw your post
                          I thought your post looks Very nice
                          And there are your secrets - post pictures somewhere else and just use its address
                          How do you do nice Highlight here ?

                          Any ways, Main topic…
                          I’ll check what you said.

                          Thanks

                          1 Reply Last reply Reply Quote 0
                          • 오
                            오바마
                            last edited by Nov 29, 2018, 1:09 AM

                            https://photos.google.com/photo/AF1QipMoXmLa29hMz4el_f6LJ6pcoC7iFTBwoI3VQw6U

                            link text

                            1 Reply Last reply Reply Quote 0
                            • P
                              PeterJones
                              last edited by Nov 29, 2018, 1:52 AM

                              I cannot access the links you posted (404 not found)

                              The forum uses Markdown (see the ? link next to the COMPOSE label when making a post). For a great guide to using Markdown on this forum, see @Scott-Sumner’s excellent rundown – this includes how to do a code block (which does the syntax highlighting in the forum)

                              오 1 Reply Last reply Nov 30, 2018, 3:08 PM Reply Quote 2
                              • 오
                                오바마 @PeterJones
                                last edited by Nov 30, 2018, 3:08 PM

                                @PeterJones

                                thanks… all your efforts.

                                I just gave up all of them.
                                -to make highlight XML
                                -to study how to post nicely in the community (this editor is soooo strange)

                                1 Reply Last reply Reply Quote 0
                                • 오
                                  오바마
                                  last edited by Dec 18, 2018, 7:06 AM

                                  I’m sorry to say like this
                                  But, it is true
                                  All of sudden it works
                                  I Really do not know why
                                  So
                                  Some time later
                                  It will go crazy again maybe
                                  Until that time I will be happy

                                  Thanks Guys.

                                  1 Reply Last reply Reply Quote 1
                                  • First post
                                    Last post
                                  The Community of users of the Notepad++ text editor.
                                  Powered by NodeBB | Contributors