Kbase P16094: NUM-CHILDREN returns unexpected number of child nodes parsing an XML document.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Unverified
SYMPTOM(s):
NUM-CHILDREN returns unexpected number of child nodes parsing an XML document.
The XML document contains whitespaces (carriage returns and spaces) for indentation purposes.
There seem to be extra nodes in addition to the expected Element nodes.
The extra nodes are of subtype 'Text'.
CAUSE:
This is expected behavior.
The XML processor considers whitespaces as separate Text nodes. Other processors, such as Microsoft's, by default ignore the whitespaces embedded in the XML document and do not create the extra Text nodes. However, Progress's behavior is the correct one.
FIX:
You can filter out these extra Text nodes by testing the X-NODEREF's SUBTYPE attribute.