문제

I have this XML and a statement of code is doing this call:

var rootStory:XML = new XML(source);
var xml:XML = rootStory..*::TextFlow[0];

What does this line do, rootStory..*::TextFlow[0]?

UPDATE:
This was the comment that was with it:

// Also note the use of "..*" below. We are using this to traverse the
// XML structure looking for particular tags and at the same time allow for
// any namespace. So, you might see something like <flow:TextContainer> or
// <TextContainer> and this code will capture both cases.

So it seems it is either looking for the string, "::" or is it that "::" is an operation like ".."?

도움이 되었습니까?

해결책

:: follows the namespace portion of the query. Therefore, *:: is requesting results from any namespace.

This post may also be helpful: E4X: grab nodes with namespaces?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top