Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to read a path with DOM?

843834Oct 29 2002 — edited Oct 29 2002
Hello. I come from the soft world of databinding, but for the current app Castor is too big. I must use DOM, but I didn't find a sample code to read element in a direct way, that's without traversing the tree.

The question is: after having a Document instance, is there something like:
  document.getPath("RBS8/DETAIL/ITEMS/AZI/ITEM/DATA")
to read elements and attribute?

This is a sample XML:
<RBS8>
  <DETAIL>
    <ITEMS>
      <AZI>
        <ITEM NAME="F.MI" STATE="TRUE">
          <DATA FIELDID="81098" VALUE="Fiat"/>
          <DATA FIELDID="81099" VALUE="8.0400"/>
      </AZI>
    </ITEMS>
  </DETAIL>
</RBS8>
Thanks alot
Enrico
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 26 2002
Added on Oct 29 2002
4 comments
157 views