Hi,
this is quite strange:
VER: FPC 3.2 up to date fixes branch
document: xml version="1.0" encoding="UTF-8"
The first few levels are only categories. Here is where reading the actual data begins:
After iNode:= CategoryNode .FirstChild is executed
1. iNode.NodeName has the right value;
2. but iNode.NodeValue is always empty even though it always has a value in the file.
Debugging uncovered that this function is called to get the value:
function TDOMNode.GetNodeValue: DOMString;
begin
Result := '';
end;
Which explains why NodeValue is always empty, but I would expect some overridden function to be called instead with access to the actual value.
iNode.NodeType = ELEMENT_NODE. But after checking the DOM unit's source neither TDOMElement nor it's ancestors have any overridden GetNodeValue. The only such overridden function is
function TDOMCharacterData.GetNodeValue: DOMString;
begin
Result := FNodeValue;
end;
So it seems iNode.NodeType should be a TEXT_NODE instead of ELEMENT_NODE. Why is it not?
This should be so simple. Where am I going wrong?