Question

<methodResponse>
    <params>
        <param>
            <value>
                <struct>
                    <member>
                        <name>topic_id</name>
                        <value>
                            <string>102</string>
                        </value>
                    </member>
                    <member>
                        <name>topic_title</name>
                        <value>
                            <string>Login test</string>
                        </value>
                    </member>
                </struct>
            </value>
        </param>
    </params>
</methodResponse>

I have this xml.. How to get the value of topic_title using xpath?

Was it helpful?

Solution

/methodResponse
   /params
      /param
         /value
            /struct
              /member[name='topic_title']
                 /value
                    /string
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top