Re: [xml] PI Parse Error

On Sat, Dec 22, 2007 at 04:01:42PM -0500, Richard Whitney wrote:

   I  am  trying  to  use  xmlReadMemory  to parse a document stored in a
   character array.
   This is the error I get when attempting to parse:
   test.xml:1: parser error : ParsePI: PI xm space expected
   test.xml:1: parser error : ParsePI: PI xm never end ...
   test.xml:1: parser error : Start tag expected, '<' not found
   Document not parsed successfully.
   XPath error : Invalid or inclomplete context
   Error in xmlXPathEvalExpression
   This is the contents I am trying to parse:
   <?xml version="1.0" encoding="us-ascii"?>
   <rpc-reply xmlns:junos="[1]";>
   Any assistance would be greatly appreciated.

laptop:~/XML -> xmllint --memory --noout tst.xml 
laptop:~/XML -> 

  Assuming I got your document correctly (impossible to ensure
 if you cut an paste it in the content of an HTML mail !) it just
works fine here since xmllint --memory uses xmlReadMemory, I
am left to assume your code just didn't give the right buffer or
a truncated one, or something else. Use of a debugger on your
own code is strongly suggested !


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]