MACROMEDIA FLASH MEDIA SERVER 2-SERVER MANAGEMENT ACTIONSCRIPT LANGUAGE Manuale Utente Pagina 128

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 155
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 127
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
125
See also
XML.getBytesTotal()
XML.getNamespaceForPrefix()
my_xml.getNamespaceForPrefix(prefix)
Returns the namespace URI that is associated with the specified prefix for the node. To determine the URI,
getPrefixForNamespace() searches up the XML hierarchy from the node, as necessary, and returns the
namespace URI of the first
xmlns declaration for the given prefix.
If no namespace is defined for the specified prefix, the method returns
null.
If you specify an empty string (
"") as the prefix and a default namespace is defined for the node (as in
xmlns="http://www.example.com/"), the method returns that default namespace URI.
Availability
Flash Media Server 2
Parameters
prefix A string; the prefix for which the method returns the associated namespace.
Returns
A string.
Example
The following example creates a very simple XML object and outputs the result of a call to
getNamespaceForPrefix():
function createXML() {
var str = "<Outer xmlns:exu=\"http://www.example.com/util\">" + "<exu:Child id='1' />"
+ "<exu:Child id='2' />" + "<exu:Child id='3' />" + "</Outer>";
return new XML(str).firstChild;
}
var xml = createXML();
trace(xml.getNamespaceForPrefix("exu")); // output: http://www.example.com/util
trace(xml.getNamespaceForPrefix("")); // output: null
See also
XML.getPrefixForNamespace()
XML.getPrefixForNamespace()
my_xml.getPrefixForNamespace(nsURI)
Returns the prefix that is associated with the specified namespace URI for the node. To determine the prefix,
getPrefixForNamespace() searches up the XML hierarchy from the node, as necessary, and returns the prefix of
the first
xmlns declaration with a namespace URI that matches nsURI.
If there is no
xmlns assignment for the given URI, the method returns null. If there is an xmlns assignment for the
given URI but no prefix is associated with the assignment, the method returns an empty string (
"").
Availability
Flash Media Server 2
Vedere la pagina 127
1 2 ... 123 124 125 126 127 128 129 130 131 132 133 ... 154 155

Commenti su questo manuale

Nessun commento