Re: [xml] PI Parse Error



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

   Experts,
   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
   <?xm
       ^
   test.xml:1: parser error : ParsePI: PI xm never end ...
   <?xm
       ^
   test.xml:1: parser error : Start tag expected, '<' not found
   <?xm
       ^
   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]http://xml.juniper.net/junos/8.4B2/junos";>
   <pim-join-information
   xmlns="[2]http://xml.juniper.net/junos/8.4B2/junos-routing";>
   <join-family>
   <pim-instance>PIM.master</pim-instance>
   <address-family>INET</address-family>
   </join-family>
   <join-family>
   <pim-instance>PIM.master</pim-instance>
   <address-family>INET6</address-family>
   </join-family>
   </pim-join-information>
   </rpc-reply>
   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 !

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/



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