TEXT FIND IN THE XML TAGS
Learn / Forums / General InDesign Topics / TEXT FIND IN THE XML TAGS
Tagged: find and replace, tags, XML tags
- This topic has 14 replies, 4 voices, and was last updated 2 years, 7 months ago by Shiv.
-
AuthorPosts
-
-
May 1, 2017 at 12:24 am #93975Amit GuptaParticipant
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
-
May 1, 2017 at 4:24 pm #94045David BlatnerKeymaster
I don’t know what you mean by “exact xml tags”
-
May 2, 2017 at 12:35 am #94048Amit GuptaParticipant
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.
-
May 2, 2017 at 8:45 am #94068David BlatnerKeymaster
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.
-
May 3, 2017 at 5:44 am #94097Masood AhmadParticipant
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.
-
May 4, 2017 at 1:15 am #94177Amit GuptaParticipant
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=sharingThe 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.
-
May 4, 2017 at 2:37 am #94178Masood AhmadParticipant
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.
-
May 4, 2017 at 7:24 am #94188Amit GuptaParticipant
Hi Masood,
Here the said link:
https://drive.google.com/open?id=0B0Ws9dJFPSBHMDZOVmdqTV9sb00Please help.
thanks, amit
-
May 4, 2017 at 8:18 am #94196Masood AhmadParticipant
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 :)
-
May 4, 2017 at 8:29 am #94199Masood AhmadParticipant
…alternatively, you can also create a
NoBreak
Character style and map it to theCODE
xml tag. -
May 8, 2017 at 12:54 pm #94331Masood AhmadParticipant
Amit, just checking, how are the things going.
-
May 9, 2017 at 4:09 am #94365Amit GuptaParticipant
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.
-
July 29, 2021 at 9:40 pm #14345093ShivMember
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>
-
July 30, 2021 at 5:10 pm #14345120David BlatnerKeymaster
Shiv: No, InDesign’s built-in XML capabilities are very limited. Perhaps it is possible to do that with a script. Not sure.
-
August 2, 2021 at 4:20 am #14345220ShivMember
@David, thanks for your response.
-
-
AuthorPosts
- You must be logged in to reply to this topic.