sets conditional for work with CDATA

Bug #823984 reported by romankrv
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ladon
Fix Committed
High
jsgaarde

Bug Description

Hi.
I have question about ladon -service.

I create simple function as you have in your example.

But I try use variable which have as CDDATA and get null string from ladon-service.

Can you explane how to work with CDDATA and how is right to take to ladon that variable ?

I think that problem is in here:

soap.py:

def nodeListToDict(nodelist):
 res_dict = {}
 for n in nodelist:
  items = getElementsByTagNameAndDepthNS(n,'*','item',1)
  if len(items):
   res_dict[n.localName.replace('-','_')] = []
   for item in items:
    if len(item.childNodes)==1 and item.childNodes[0].nodeType==n.TEXT_NODE:
     res_dict[n.localName.replace('-','_')] += [getCharacters([item.childNodes[0]])]
    else:
     res_dict[n.localName.replace('-','_')] += [nodeListToDict(item.childNodes)]
  else:
   res_dict[n.localName.replace('-','_')] = getCharacters(n.childNodes)
 return res_dict

here: if len(item.childNodes)==1 and item.childNodes[0].nodeType==n.TEXT_NODE:

I think that one need to add some conditional for CDATA?

Can you fix it?

thanks

Revision history for this message
romankrv (romankrv) wrote :
Revision history for this message
jsgaarde (jakob-simon-gaarde) wrote :

I have made a patch to fix this problem.

Best Regards
Jakob Simon-Gaarde

Changed in ladon:
status: New → Confirmed
assignee: nobody → jsgaarde (jakob-simon-gaarde)
importance: Undecided → High
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.