First of all - there can as many fx-instance
elements as you need.
We got 2 instances that create 2 separate XML documents. The first in document order is
the default instance. All following ones need to have an id
.
It's important to understand that the data are not part of the html page but exist as separate document in memory. Therefore you cannot inspect the state of the instance data with a developer tool.
This not only ensures the integrity of the instance data but also allows us to work with real XML documents.
Inline instances use the HTML DOM of the browser which e.g.
only supports lowercase element names, no namespaces etc. If you intend to work with
full XML documents you need to use external to use external files with the src
attribute. See
next example.
To refer to a node in a non-default instance you have to use the instance()
function which takes
the id
as parameter. This returns the root-node of that instance.