How to check for child node
Posted: Wed Jan 18, 2023 11:28 am
Hi Team,
Suppose I have access to below entry node.
I wanted to check if leaderchar is present or not in entry anywhere.
as we don't have leaderchar as direct child of entry.
I can think of get all child nodes then child of child nodes and check if it is leaderchar or not with the existing method which I know.
But instead of verifying for all node one by one. I am wondering if we have any method in oxygen which will check if childnode is present with given name (can be present as grand child of node) in the given node.
<entry>
<para>
<paratext> check <bold><bold/>opportunity
<leader source="dtbl">
<leaderchar>with notice and an opportunity</leaderchar>
</leader> check
<leader source="dtbl">
<leaderchar>with notice and an opportunity</leaderchar>
</leader>
</paratext>
</para>
</entry>
Please let me know if you need any more details.
Thanks & Regards,
Smita
Suppose I have access to below entry node.
I wanted to check if leaderchar is present or not in entry anywhere.
as we don't have leaderchar as direct child of entry.
I can think of get all child nodes then child of child nodes and check if it is leaderchar or not with the existing method which I know.
But instead of verifying for all node one by one. I am wondering if we have any method in oxygen which will check if childnode is present with given name (can be present as grand child of node) in the given node.
<entry>
<para>
<paratext> check <bold><bold/>opportunity
<leader source="dtbl">
<leaderchar>with notice and an opportunity</leaderchar>
</leader> check
<leader source="dtbl">
<leaderchar>with notice and an opportunity</leaderchar>
</leader>
</paratext>
</para>
</entry>
Please let me know if you need any more details.
Thanks & Regards,
Smita