Show indent level

Oxygen general issues.
Ewout124
Posts: 3
Joined: Tue May 24, 2016 4:58 pm

Show indent level

Post by Ewout124 »

Is it possible to show the level of indentation of all elements in an XML file? The top level element should have indent level 1, all elements that are directly below the top level should have indent level 2, all elements that are part of elements on indent level 2 should have indent level 3, et cetera. I think this would be helpful in documenting the structure of an XML file.

Perhaps Oxygen already has an option to do just this, but I couldn't find such an option so far.
Costin
Posts: 829
Joined: Mon Dec 05, 2011 6:04 pm

Re: Show indent level

Post by Costin »

Hello,

It is not very clear what you mean by
level of indentation of all elements
.
From what you describe, it seems you want to know more the depth of each element (nesting level) rather than the indentation.
Unfortunately, we do not have some sort of indent counter for elements and there is not possible to have this displayed in the editor (for each element)

You could of course use an XPath to count the indent level, but this would mean you should manually run the XPath for each element.
The XPath could be something like:

Code: Select all

count(ancestor-or-self::*)
You can also notice the nesting of an element and its ancestors in the breadcrumb view, which is a bar presenting the element and all of his ancestors for quick navigation inside a document. The breadcrumb is available right beyond the tab bar in the editor.
But, as I specified, this only makes navigating between elements easier and presents a visual succession of the elements.

I hope this helps.

Best Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
Ewout124
Posts: 3
Joined: Tue May 24, 2016 4:58 pm

Re: Show indent level

Post by Ewout124 »

Costin,

Thank you for your reply. Indeed, I should have used the term 'nesting level' instead of 'indentation level' :oops: !

I have seen that the 'Breadcrumb Navigation in Text Mode' was introduced in version 17.1 Unfortunately, I am still using version 16.1 :( . Well, I'll just have to wait for the installation of version 17.1.

Ewout
Post Reply