XML Data Retrieve

Hi All,
i am trying to retrieve data from a XML, but i keep getting error.

I would like to extract the attribute ‘value’ under entry–>resource–>Appointment–>id(Attribute name is ‘value’) &
The attribute value of node name ‘type’ under Bundle second line.
Please help

the xml is defining a namespace.

Have a look below on how to handle: