Announcement Announcement Module
Collapse
No announcement yet.
How to get the xml node value at below situation? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to get the xml node value at below situation?

    Hello, dear all

    I used ROO to generated a project, and configured it returned the XML result via REST. The xml data is as below:
    -------
    <list>
    <com.domain.Products>
    <cla__id>
    <cname>class1</cname>
    <id>1</id>
    </cla__id>
    <name>pname1</name>
    <id>1</id>
    </com.domain.Products>

    <com.domain.Products>
    <cla__id reference="../../com.domain.Products/cla__id"/>
    <name>pname2</name>
    <id>2</id>
    </com.domain.Products>
    </list>
    -------

    Now I need to get the cname node value via xpath, for the first node of <com.domain.Products>, it is obvious, but for the 2nd node of <com.domain.Products>, how can I do this since it is using the reference attribute?

    Any one met such problem and how to resolve? Thanks a lot.

  • #2
    Any one could help please? Tried to find the answer but just did not find...
    Or can I let the second node will just show the detailed info of <cla__id>, not reference?

    Thanks so much in advance!

    Comment

    Working...
    X