Why doesn't this work? XML reference

// Dynamic reference
var node:XMLList = xml…page.(@id == ‘test’);

// Doesn’t work. Returns null
trace(node);

// Works. Returns XML
trace(xml…page.(@id == ‘test’));

Can someone explain this to me?
Does someone know a workaround or solution for a dynamic reference?

/ Frank