Search for xml tags with line break
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 5
- Joined: Tue May 03, 2011 5:54 am
Search for xml tags with line break
This will be a newbie question so bear with me:
How can I use Oxygen to search a collection of DITA xml files for <ul or <ol occurrences only after a closing paragraph tag-- even if on the next line? In other words, finding all instances of this:
I just want to find places where either unordered or ordered lists have been started outside of the paragraph instead of inside it, and having no luck using regular expressions to find it because of the line break.
Please give as much detail as you can if responding.
Thanks,
How can I use Oxygen to search a collection of DITA xml files for <ul or <ol occurrences only after a closing paragraph tag-- even if on the next line? In other words, finding all instances of this:
Code: Select all
</p>
<ol
Please give as much detail as you can if responding.
Thanks,
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Search for xml tags with line break
Hello,
Use the Find Replace in Files dialog with the following settings.
1. Text to find:
2. Enable "Regular expression".
3. Restrict to XPath:
4. Scope: the folder or selection of your DITA files.
What the XPath does is: It looks for all ul and ol elements(//(ul|ol)) which have the first preceding element(preceding-sibling::*[1]) named 'p'(name(...)='p').
Regards,
Adrian
Use the Find Replace in Files dialog with the following settings.
1. Text to find:
Code: Select all
(<ul|<ol)
3. Restrict to XPath:
Code: Select all
//(ul|ol)[name(preceding-sibling::*[1])='p']
What the XPath does is: It looks for all ul and ol elements(//(ul|ol)) which have the first preceding element(preceding-sibling::*[1]) named 'p'(name(...)='p').
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Return to “General XML Questions”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service