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

PJ Fanning commented on XMLBEANS-629:
-------------------------------------

XmlBeans is in maintenance mode. There is no community around changing code 
behaviours that have been in place for more than 10 years. XmlBeans 2.3.0 was 
released in 2007.

There are lots of other ways to do what you need to - eg with DOM and XPath - 
stuff built into the Java runtime.

If you feel very strongly about this, try creating a PR and someone might 
review it. I would still advise you to try using another approach if the XML 
cursor approach does not do what you want it to.

 

> org.apache.xmlbeans.XmlObject.selectPath(String arg0) API returns wrong 
> values after org.apache.xmlbeans.XmlCursor.moveXml(XmlCursor arg0) API call
> ---------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: XMLBEANS-629
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-629
>             Project: XMLBeans
>          Issue Type: Bug
>          Components: XPath
>    Affects Versions:  Version 2.3, Version 3.1.0, Version 5.1.1
>         Environment: Windows/Linux
>            Reporter: Shinith PP
>            Priority: Major
>         Attachments: XMLBeanBugTest.zip
>
>
> When I search for an XmlObject within the root xml document using 
> org.apache.xmlbeans.XmlObject.selectPath(String arg0) API with following 
> query expression selectPath() is returning the matching XmlObject.
> selectPath("declare namespace wf='http://www.example.org/SimplifiedSchema' 
> //wf:data[@id='data.85']")
> *{color:#de350b}but calling the same method with same query expression 
> returns no matching XmlObjects after moving one child xml object from one 
> location to another location within using 
> org.apache.xmlbeans.XmlCursor.moveXml(XmlCursor arg0) API{color}.*
> As per my xml schema my xml have the following structure.
> <session>
>     <task>
>         <task>
>             <data><data/>
>         </task>
>     </task>
> </session>
> root document is session. Inside session we can have task. Inside task we can 
> have task and data.
> *{color:#de350b}The issue arises when I search for a data using it's id after 
> moving one child task to new location within a parent task.{color}*
> I have attached the schema file and sample code to reproduce the issue for 
> reference.



--
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