If I have a XML-document like this
<Doc>
<File>
<ObjectID></ObjectID>
</File>
</Doc>
And it sometimes can look like this
<Doc>
<Name />
<File>
<ObjectID></ObjectID>
</File>
</Doc>
How can I get the File
-elements?
They are not always on the same level, sometimes they can be on the root-level
There could also be times, when it is placed multiple times in the Document (but then they are at the same level)
UPDATE
The <File>
-element can also have <File>
elements below, which should not be parsed like this
<Doc>
<Name />
<File>
<ObjectID></ObjectID>
<RelatedTo>
<File></File>
</RelatedTo>
</File>
</Doc>
In which case the result should be
<File>
<ObjectID></ObjectID>
<RelatedTo>
<File></File>
</RelatedTo>
</File>