XML Server Getting Started
customerList.retrieve();
}
provided, of course that query behind customerList requires state value as an argument.
The later would be equivalent to
function window::onLoad() {
customerList.connection = asademo ;
customerList.retrieve( NJ );
}
All XML Node objects are, simply pointers to instances of
IXMLDOMNode interface
. To illustrate the use of XML Node
objects, we will rewrite the above
window::onLoad()
function so that retrieval context is prepared dynamically , instead of
using single constant string:
function window::onLoad() {
var context = xmlapi.XMLfromString("");
var node = context.createElement("currentsqlid");
node.text = "asademo";
context.documentElement.appendChild(node);
node = context.createElement("arg1");
node.text = "NJ";
context.documentElement.appendChild(node);
customers.context = context;
customers.retrieve();
}
The
documentElement
property of the XMLDocument is the topmost node in XML document tree. Keep in mind that it has a
null
value if document is empty (contains no nodes). The other important remark to the above code is that creation of the
nodes to be appended anywhere in the document tree should be performed with the corresponding XMLDocument object.
2000 2002 Computer Technology Inc. All rights reserved.
Page 12
J2EE Web Hosting Tundra XML Server Pages J2EE Hosting
|
|
|
|
TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved. |