Problem in migrating code from 7.1 to 9.5 (TN)

The root node of the xml document is as follows:header

<?xml version="1.0" encoding="UTF-8"?> 10 info

The above attributes in the document documentid and documentname are referred as below.
documentid
Header[0]/order[0]/orderdata[0]/documentid

documntname:

book[0]/transdata[0]/transinfo[0]/documentname

I guess we are not able to refer the second attribute. Any how please let me know if we define the attribute structure in TN document type. Are we able to recognize the document.

Thanks,
Prakash,.