XML : libxml2 returns None for all cases

Trying to run libxml2 on my mac

I have a valid XML(var xml_data) coming from some source, which i have validated from w3 (not w3schools) validator and its fine

ipdb attempt :

  ipdb> libxml2.parseDoc('<a>hi</a>')  <xmlDoc (None) object at 0x10ac4fe18>    

OR

  ipdb> doc = libxml2.parseMemory(xml_data, len(xml_data))  ipdb> doc  <xmlDoc (None) object at 0x10ac4fe60>  ipdb>    

Ideally it should return an object which contain some value instead of None.Can any one help me in pointing out if i am missing something or what is wrong with my attempt?

No comments:

Post a Comment