[ 
https://issues.apache.org/jira/browse/XMLBEANS-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17578908#comment-17578908
 ] 

PJ Fanning commented on XMLBEANS-621:
-------------------------------------

Txn element is in a namespace in xmlObjectExample.xml - it won't match your 
XPath (/req:SelectGenerateDeliver/req:request/data:TransactionData/Txn)

xmlns:exp="http://schemas.bankerssystems.com/2004/ExpereTxn";

You need to declare the exp namespace prefix mapping when you do your XPath 
expression.

And then the XPath should be changed to 
/req:SelectGenerateDeliver/req:request/data:TransactionData/exp:Txn

> Error when get element(node) of XmlObject by selecPath()
> --------------------------------------------------------
>
>                 Key: XMLBEANS-621
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-621
>             Project: XMLBeans
>          Issue Type: Bug
>          Components: XmlObject
>            Reporter: Huynh Long Thang
>            Priority: Major
>         Attachments: image-2022-08-12-09-54-54-168.png, 
> image-2022-08-12-10-05-58-838.png, xmlObjectExample.xml
>
>
> Hi XMLBeans team,
> We have a problem when using Xpath with selectPath method in newest version. 
> *It worked as well in version 3.1.0.*
> Our xmlObject is built directly using the class built from the schema . For 
> example:
> SelectGenerateDeliverDocument xml = 
> SelectGenerateDeliverDocument.Factory.newInstance();
> When we try to debug, there is a difference as below:
> 1)
> !image-2022-08-12-09-54-54-168.png! 2) Next function: It can not get 
> schemaGlobalElement and return XmlAnyTypeImpl for the element which we try to 
> select by xpath in our XMLObject.
> !image-2022-08-12-10-05-58-838.png!
> Our Xpath is: /req:SelectGenerateDeliver/req:request/data:TransactionData/Txn 
> and a example xml is attached.
> Please help to review and support us for this issue. It is very nice if we 
> can provide you more information if needing. Thank you.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to