Is there a way to return an xpath result in JavaScript as string that included all the tags and attributes?
For example in the following xml:
<people xmlns:xul = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
<person>
<name first="george" last="bush" />
<address street="1600 pennsylvania avenue" city="washington" country="usa"/>
<phoneNumber>202-456-1111</phoneNumber>
</person>
<person>
<name first="tony" last="blair" />
<address street="10 downing street" city="london" country="uk"/>
<phoneNumber>020 7925 0918</phoneNumber>
</person>
</people>
The xpath '//person/phoneNumber' would return:
<phoneNumber>202-456-1111</phoneNumber>
<phoneNumber>020 7925 0918</phoneNumber>
Rather than just the numbers?