File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes XPATH in binding files...Nightmare Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XPATH in binding files...Nightmare" Watch "XPATH in binding files...Nightmare" New topic

XPATH in binding files...Nightmare

Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 641
Hi, I am using xpath in jaxb bindings file and its nightmare...some one kindly help me out..

my xsd has following structure

I can access any child parameter by placing its binding tag in parent binding using .//xs:element , but it works only if the given element is present only once, else I get error results in too many (2) target nodes

example works only is file is single node in parent but not if there is one more file indirectly under n levels of current node.

I assume this is because .// means access any node after current node so I tried ./ but it returns empty node...

any clue?

All desirable things in life are either illegal, banned, expensive or married to someone else !!!
It is sorta covered in the JavaRanch Style Guide.
subject: XPATH in binding files...Nightmare
It's not a secret anymore!