TEXT FIND IN THE XML TAGS

Learn / Forums / General InDesign Topics / TEXT FIND IN THE XML TAGS

Viewing 14 reply threads
  • Author
    Posts
    • #93975
      Amit Gupta
      Participant

      Hi Guys,

      I am working with the xml in InDesign and want to find text in exact xml tags.

      Is it possible to find exact xml tags??

      Thanks, Amit

    • #94045
      David Blatner
      Keymaster

      I don’t know what you mean by “exact xml tags”

    • #94048
      Amit Gupta
      Participant

      Hi David,

      Thanks for your response.

      I mean, if we need to find any text between the “X” tag in InDesign documents then How to find the text on particular xml tags.

      Please suggest.

    • #94068
      David Blatner
      Keymaster

      Ah, I see. I think perhaps the best way to do that is to assign a paragraph or character style to the text (using map tags to styles) and then use Find/Change to find the text in that style.

    • #94097
      Masood Ahmad
      Participant

      To my understanding you need a Grep style:

      GREP Styles:
      Apply Style: CharacterStyleForTheXMLtags
      To Text: <.+?(?=>)>

      Create a Character style that you would like to apply to the tags other than the text in between the XML tags. Then you can use the above settings using the GREP styles through paragraph styles.

      Let me know if I’m thinking the same.

    • #94177
      Amit Gupta
      Participant

      Hi David and Masood,

      Thanks for your responses. I have tried your suggestion but it could not get the expected result.

      However, I am sharing the screenshot which numbers need to go with the same line.
      https://drive.google.com/file/d/0B0Ws9dJFPSBHMUdvOHp4ek54UlU/view?usp=sharing

      The highlighted blue marked is going in same line but the red mark text is a break after the dot and I need to go with the same line.

      Please suggest.

    • #94178
      Masood Ahmad
      Participant

      Hi Amit, Can you send us the snapshot with hidden characters and one with from the story editor. I would like to see the tags involved, as you said.

    • #94188
      Amit Gupta
      Participant

      Hi Masood,

      Here the said link:
      https://drive.google.com/open?id=0B0Ws9dJFPSBHMDZOVmdqTV9sb00

      Please help.

      thanks, amit

    • #94196
      Masood Ahmad
      Participant

      Try this (both options F/C and Grep Styles)

      GREP Find/Change:
      Find What: \u\d{2}\.[\u\d]{1,2} .$
      Change to:
      Change Format: NoBreakCharacterStyle

      GREP Styles:
      Apply Style: NoBreakCharacterStyle
      To Text: \u\d{2}\.[\u\d]{1,2} .$

      and let me know if it works for you :)

    • #94199
      Masood Ahmad
      Participant

      …alternatively, you can also create a NoBreak Character style and map it to the CODE xml tag.

    • #94331
      Masood Ahmad
      Participant

      Amit, just checking, how are the things going.

    • #94365
      Amit Gupta
      Participant

      Hi Masood,

      Sorry for late reply, I was swamped to another things that’s why could not access the email.

      Now, I have checked the tricks as per your suggestion. It’s work perfectly.

      Can you please teach me the actual logic behind this grep query.

      Thank you so much for your great help and time.

    • #14345093
      Shiv
      Member

      Still, we don’t have the option to search for tag names, attr names, attr values, etc?

      Sometimes, I would like to search for fig id like this “fig-2003″ and navigate to the right page.

      <figure id=”fig-2003″ ref=”filepath”></figure>

    • #14345120
      David Blatner
      Keymaster

      Shiv: No, InDesign’s built-in XML capabilities are very limited. Perhaps it is possible to do that with a script. Not sure.

    • #14345220
      Shiv
      Member

      @David, thanks for your response.

Viewing 14 reply threads
  • You must be logged in to reply to this topic.
>