I was using that example, but a bug occured Get line number from xml node - java
It works great, but fails on the following cases:
<activity
android:name=".Main2Activity"
android:label="@string/title_activity_main2"
android:theme="@style/AppTheme.NoActionBar" />
So if a node is written on a few lines, it returns the last line. For the provided example it will return 4, but not 1. Does anybody have any ideas for to fix it? Thanks