sibling navigation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xml beginner
    New Member
    • Nov 2008
    • 1

    sibling navigation

    hello,

    i have an xml doc that looks like

    <invoice>
    <invoice_line >
    <invoice_projec t_details></invoice_project _details>
    <line_notes> </line_notes>
    </invoice_line>
    </invoice>

    in my code, the current node is "invoice_projec t_details". how do i get to line_notes with xpath?

    I've tried using "following-sibling::line_n otes" with no success. i've reached the point of frustration where i need to post on a board. please help.


    thank you.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    do you have any namespaces in your xml?
    if
    parent::*/line_notes
    doesn't work too, I definitely suspect some forgotten namespace.

    regards

    Comment

    • jkmyoung
      Recognized Expert Top Contributor
      • Mar 2006
      • 2057

      #3
      I suggest using debugging statements like:
      Current name of node = <xsl:value-of select="name()"/>

      Which should give you both the namespace and local-name of the current node.

      Comment

      Working...