[libxml-devel] String parsing

Eric M. tenpaiyomi at gmail.com
Sun Aug 3 15:24:09 EDT 2008


I'm not sure if I'm just doing something wrong or whatnot, but I
cannot get any form of xpath searching to work on a parsed string.
Specifically, here is what is happening:

-> XML generated, sent out to server
<- Server receives XML, sends out response
-- response received, xml = XML::Parser.string(response.body).parse
-- xml.find('/error') executed, result is nil;

XML response, and value of xml, is formatted like so:

<?xml version="1.0" encoding="UTF-8"?>
<error xmlns="http://some-url.com" serial-number="some-serial-number">
  <error-message>Error message here.</error-message>
</error>


More information about the libxml-devel mailing list