How Do I Access an XML Document Stored in a Magic xpa Data Variable? (Magic xpa 3.x)
You can use the XML view to access an XML document directly from a BLOB, without converting that BLOB to a file first.
-
Specify your Main Source as your XML view.
-
Go to the Properties of the Main Source (Alt+Enter).
-
Go to the XML Source variable, zoom (F5) to the Variable list.
-
Select the BLOB that contains your XML document.
Now you can use the XML document in the same way you would as if it were in a file.
See also the How Do I Create Different XML Docs Based on the Same Schema? topic.
If you are using the XML functions rather than the XML data views, you can use a BLOB in the Exp/Var column of the I/O Device name.
-
Press Ctrl+I to access the I/O Devices.
-
Press F4 to open up a line.
-
Select Variable in the Media column.
-
In the Exp/Var column, select the BLOB you want to access.
-
Now, you can use this I/O device in the XML functions. You will refer to it by the generation (0 for the current task, 1 for the parent, etc.) and the sequence number of the file (here, it is 1, but you may have more I/O devices in your task).
How Do I Handle an XML Document with No Schema?
The Online and Rich Client Samples projects (program XM10 and RXM10)