Technical References - [xmlnode]

numero = 283
interpreted = N
texte = [xmlnode ref=...&var=...&path=...]<WebDNA>[/xmlnode] Parameters: · ref - Reference to an xml object variable. If this parameter is not provided, then it is assumed that there is an 'outer' [xmlnode/s] context from which to reference a particular XML node. · var - User defined name for this persisted node instance. If this parameter is not provided, then this node instance will not be persisted · path - Path to the desired XML node. If an XPath expression is used, it should evaluate to a single node. WebDNA Tags available from within an [xmlnode] context... · [name] - The name of the XML node. · [value] - The value of the XML node. Will be empty if the node is a 'container' node, i.e. contains other XML nodes. · [content] - The 'raw' xml content of the node. · [iscontainer] - 'T' if the current node contains other XML nodes. This context is used to retrieve the contents of the specific node. The 'path' parameter is used to locate the node. As with the [XMLNodes] context, the 'path' parameter has three modes; 'named:', 'indexed:', and 'xpath:'. [xmlnode] can also be used to persist a 'pointer' to a specific node. This reference can then be used in subsequent calls to other XML contexts. Lets use the XMLNode context to retrieve the TITLE information of the third CD node of the example1.xml file.... Code used...
[xmlparse var=xml_var1][include file=example1.xml][/xmlparse][xmlnode ref=xml_var1&path=indexed:1/3/1][name]=[value][/xmlnode]
You'll notice that we used the 'indexed' path method. This is because we have explicit knowledge of the XML file, and can there for use the indexed method to jump quickly to the desired XML node. Results... TITLE=Greatest Hits Now lets use the [XMLNode] context to persist a reference to the third 'CD' node, then use that reference in an XMLNodes context to retrieve the child nodes of the example1.xml file... Code used...
[xmlparse var=xml_var1][include file=example1.xml][/xmlparse][xmlnode ref=xml_var1&path=indexed:1/3&var=xml_CD3][/xmlnode][xmlnodes ref=xml_CD3][name]=[value][/xmlnodes]
Results... TITLE=Greatest Hits ARTIST=Dolly Parton COUNTRY=USA COMPANY=RCA PRICE=9.90 YEAR=1982 [xmlnode ref=...&var=...&path=...]<WebDNA>[/xmlnode]

Parameters:

· ref - Reference to an xml object variable. If this parameter is not provided, then it is assumed that there is an 'outer' [xmlnode/s] context from which to reference a particular XML node.
· var - User defined name for this persisted node instance. If this parameter is not provided, then this node instance will not be persisted
· path - Path to the desired XML node. If an XPath expression is used, it should evaluate to a single node.
WebDNA Tags available from within an [xmlnode] context...

· [name] - The name of the XML node.
· [value] - The value of the XML node. Will be empty if the node is a 'container' node, i.e. contains other XML nodes.
· [content] - The 'raw' xml content of the node.
· [iscontainer] - 'T' if the current node contains other XML nodes.

This context is used to retrieve the contents of the specific node. The 'path' parameter is used to locate the node. As with the [xmlnodes] context, the 'path' parameter has three modes; 'named:', 'indexed:', and 'xpath:'. [xmlnode] can also be used to persist a 'pointer' to a specific node. This reference can then be used in subsequent calls to other XML contexts.

Lets use the XMLNode context to retrieve the TITLE information of the third CD node of the example1.xml file....

Code used...
[xmlparse var=xml_var1][include file=example1.xml][/xmlparse]
[xmlnode ref=xml_var1&path=indexed:1/3/1]
[name]=[value]
[/xmlnode]

You'll notice that we used the 'indexed' path method. This is because we have explicit knowledge of the XML file, and can there for use the indexed method to jump quickly to the desired XML node.

Results...

TITLE=Greatest Hits

Now lets use the [xmlnode] context to persist a reference to the third 'CD' node, then use that reference in an XMLNodes context to retrieve the child nodes of the example1.xml file...

Code used...
[xmlparse var=xml_var1][include file=example1.xml][/xmlparse]
[xmlnode ref=xml_var1&path=indexed:1/3&var=xml_CD3][/xmlnode]
[xmlnodes ref=xml_CD3]
[name]=[value]
[/xmlnodes]

Results...

TITLE=Greatest Hits
ARTIST=Dolly Parton
COUNTRY=USA
COMPANY=RCA
PRICE=9.90
YEAR=1982

DOWNLOAD WEBDNA NOW!

Top Articles:

AWS Raw WebDNA LAMP-Plus WebServer

Amazon Web Services (AWS) README for Machine Image ID...

F.A.Q

A compilation of some user's questions...

WebDNA Modules

A list of the currently available modules...

Technical Change History

This Technical Change History provides a reverse chronological list of WebDNA changes...

WebDNA Libraries

A list of available libraries for WebDNA...

[biotype]

BioType is a behavioral biometrics WebDNA function based on ADGS research and development (from version 8...

Related Readings:

[sendmail]

There is hardly a website that doesn't at some point need to send an email...

[array]

Array Operation...

[lastautonumber]

displays the last auto-generated number...

[lineitems]

Loops through all the line items in an order file...

[convertchars]

[url]...

Web Hosting Control Panels and WebDNA

Web Hosting Control Panels are becoming prevelant in the industry...