[xml] ignore undefined namespaces during parsing

version used libxml2-2.7.3
platform - windows XP
I am parsing the following  string
std::string s2 = "<root><nmspace:test1 hh=\"yyy\"></root>"
 xmlDocPtr myDoc =  xmlParseDoc((const unsigned char*)s2.c_str());
I get the error "namespace error .. namespace prefix nmspace on test1 is not declared"
Is it possible to suppress this error ? 
 When I  call xmlNodeDump(root_node)  I get the following result
<root><test1 hh="yyy"></root>. Why is the namespace removed ? Is there any when to serialize the DOM to a string with the namespace ?

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