﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0014)about:internet -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="book" content="ActionScript&nbsp;3.0&nbsp;Language&nbsp;and&nbsp;Components&nbsp;Reference"><link rel="stylesheet" href="style.css" type="text/css" media="screen"><link rel="stylesheet" href="print.css" type="text/css" media="print"><link rel="stylesheet" href="override.css" type="text/css"><meta name="keywords" content="QName,globalClassifier.QName,-Infinity,CASEINSENSITIVE,DESCENDING,E,Infinity,LN10,LN2,LOG10E,LOG2E,MAX_VALUE,MAX_VALUE,MAX_VALUE,MIN_VALUE,MIN_VALUE,MIN_VALUE,NEGATIVE_INFINITY,NUMERIC,NaN,NaN,PI,POSITIVE_INFINITY,RETURNINDEXEDARRAY,SQRT1_2,SQRT2,UNIQUESORT,callee,constructor,date,dateUTC,day,dayUTC,dotall,errorID,extended,fixed,fullYear,fullYearUTC,global,hours,hoursUTC,ignoreCase,ignoreComments,ignoreProcessingInstructions,ignoreWhitespace,lastIndex,length,length,length,length,localName,message,milliseconds,millisecondsUTC,minutes,minutesUTC,month,monthUTC,multiline,name,prefix,prettyIndent,prettyPrinting,prototype,seconds,secondsUTC,source,time,timezoneOffset,undefined,uri,uri,Array,Boolean,Number,Object,String,UTC,Vector,XML,XMLList,abs,acos,addNamespace,appendChild,apply,asin,atan2,atan,attribute,attribute,attributes,attributes,call,ceil,charAt,charCodeAt,child,childIndex,child,children,children,comments,comments,concat,concat,concat,contains,contains,copy,copy,cos,decodeURIComponent,decodeURI,defaultSettings,descendants,descendants,elements,elements,encodeURIComponent,encodeURI,escape,every,every,exec,exp,filter,filter,floor,forEach,forEach,fromCharCode,getDate,getDay,getFullYear,getHours,getMilliseconds,getMinutes,getMonth,getSeconds,getStackTrace,getTime,getTimezoneOffset,getUTCDate,getUTCDay,getUTCFullYear,getUTCHours,getUTCMilliseconds,getUTCMinutes,getUTCMonth,getUTCSeconds,hasComplexContent,hasComplexContent,hasOwnProperty,hasOwnProperty,hasOwnProperty,hasSimpleContent,hasSimpleContent,inScopeNamespaces,indexOf,indexOf,indexOf,insertChildAfter,insertChildBefore,int,isFinite,isNaN,isPrototypeOf,isXMLName,join,join,lastIndexOf,lastIndexOf,lastIndexOf,length,length,localName,localeCompare,log,map,map,match,max,min,name,namespaceDeclarations,namespace,nodeKind,normalize,normalize,parent,parent,parse,parseFloat,parseInt,pop,pop,pow,prependChild,processingInstructions,processingInstructions,propertyIsEnumerable,propertyIsEnumerable,propertyIsEnumerable,push,push,random,removeNamespace,replace,replace,reverse,reverse,round,search,setChildren,setDate,setFullYear,setHours,setLocalName,setMilliseconds,setMinutes,setMonth,setName,setNamespace,setPropertyIsEnumerable,setSeconds,setSettings,setTime,setUTCDate,setUTCFullYear,setUTCHours,setUTCMilliseconds,setUTCMinutes,setUTCMonth,setUTCSeconds,settings,shift,shift,sin,slice,slice,slice,some,some,sortOn,sort,sort,splice,splice,split,sqrt,substr,substring,tan,test,text,text,toDateString,toExponential,toExponential,toExponential,toFixed,toFixed,toFixed,toLocaleDateString,toLocaleLowerCase,toLocaleString,toLocaleString,toLocaleString,toLocaleTimeString,toLocaleUpperCase,toLowerCase,toPrecision,toPrecision,toPrecision,toString,toString,toString,toString,toString,toString,toString,toString,toString,toString,toString,toString,toString,toTimeString,toUTCString,toUpperCase,toXMLString,toXMLString,trace,uint,unescape,unshift,unshift,valueOf,valueOf,valueOf,valueOf,valueOf,valueOf,valueOf,valueOf,valueOf,valueOf,valueOf"><title>QName (ActionScript 3.0)</title><script src="AC_OETags.js" type="text/javascript"></script></head><body><script language="javascript" type="text/javascript" src="asdoc.js"></script><script language="javascript" type="text/javascript" src="help.js"></script><script language="javascript" type="text/javascript" src="cookies.js"></script><script language="javascript" type="text/javascript">  
            <!--  
			    
				asdocTitle = 'QName - ActionScript 3.0 Language and Components Reference';

				var baseRef = '';

				window.onload = configPage;
			      
			    -->  
            </script>
<script language="javascript" type="text/javascript"><!--
function submitValue(){
var searchStr=document.getElementById('search-livedocs').value;
window.location="search.html"+"###"+searchStr;
}
--></script><script type="text/javascript">
		scrollToNameAnchor();
	</script><table class="titleTable" cellpadding="0" cellspacing="0" id="titleTable" style="display:none"><tr><td class="titleTableTitle" align="left">ActionScript 3.0 Language and Components Reference</td><td class="titleTableSearch" align="center"><form class="searchForm" method="get" action="search.html" onsubmit="submitValue();"><input class="hidden" name="loc" value="" type="hidden"><input class="hidden" name="termPrefix" value="" type="hidden"><input class="hidden" name="term" value="" type="hidden"><input class="hidden" name="area" value="" type="hidden"><input id="search-livedocs" name="search_text" value="" title="" type="text"> <input type="button" name="action" value="Search" onclick="submitValue()"></form></td><td class="titleTableTopNav" align="right"><a href="../../Flash/10.0_Welcome/index.html">Home</a>&nbsp;|&nbsp;<a href="package-summary.html" onclick="loadClassListFrame('all-classes.html')">All Packages</a>&nbsp;|&nbsp;<a href="class-summary.html" onclick="loadClassListFrame('all-classes.html')">All Classes</a>&nbsp;|&nbsp;<a href="language-elements.html">Language Elements</a>&nbsp;| <a href="all-index-Symbols.html" onclick="loadClassListFrame('index-list.html')">Index</a>&nbsp;|&nbsp;<a href="appendixes.html">Appendixes</a>&nbsp;|&nbsp;<a href="conventions.html">Conventions</a>&nbsp;|&nbsp;<a id="framesLink1" href="index.html?QName.html&amp;">Frames</a><a id="noFramesLink1" style="display:none" href="" onclick="parent.location=document.location"> No Frames </a></td><td class="titleTableLogo" align="right" rowspan="3"><img src="images/logo.jpg" class="logoImage" alt=" Adobe Logo " title=" Adobe Logo "></td></tr><tr class="titleTableRow2"><td class="titleTableSubTitle" id="subTitle" align="left">QName</td><td class="titleTableSubNav" id="subNav" align="right" colspan="2"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#eventSummary">Events</a>&nbsp;| <a href="#styleSummary">Styles</a>&nbsp;| <a href="#effectSummary">Effects</a>&nbsp;| <a href="#constantSummary">Constants</a>&nbsp;| <a href="#includeExamplesSummary">Examples</a></td></tr><tr class="titleTableRow3"><td colspan="3">&nbsp;</td></tr></table><script language="javascript" type="text/javascript" xml:space="preserve">
                
                    
                

				<!--

				
				    
				

					if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("QName"); titleBar_setSubNav(false,true,false	,false,false,false,true,true,false	,false,false,false,false,false);}

				    
				        
				    
				-->
                
                    
                
			</script><div class="MainContent"><table class="classHeaderTable" cellpadding="0" cellspacing="0"><tr><td class="classHeaderTableLabel">Package</td><td><a href="package-detail.html" onclick="javascript:loadClassListFrame('class-list.html')">Top Level</a></td></tr><tr><td class="classHeaderTableLabel">Class</td><td class="classSignature">public final   class  QName</td></tr><tr><td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">QName  <img src="images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> <a href="Object.html">Object</a></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p></p>
        QName objects represent qualified names of XML elements and attributes. Each
QName object has a local name and a namespace Uniform Resource Identifier (URI). 
When the value of the namespace URI is
        <code>null</code>
        , the QName object matches any namespace.
Use the QName constructor to create a new QName object that is either a copy of another QName 
object or a new QName object with a
        <code>uri</code>
        from a Namespace object and a
        <code>localName</code>
        from a QName object.
        <p>
          Methods specific to E4X can use QName objects interchangeably with strings. 
E4X methods are in the QName, Namespace, XML, and XMLList classes.
These E4X methods, which take a string, can also take a QName object. 
This interchangeability is how namespace support works with, for example, 
the
          <code>XML.child()</code>
          method.
        </p>
        
               <p>The QName class (along with the XML, XMLList, and Namespace classes) implements 
powerful XML-handling standards defined in ECMAScript for XML 
(E4X) specification (ECMA-357 edition 2).</p>
        
               <p>
          A qualified identifier evaluates to a QName object. If the QName object of an XML element is 
specified without identifying a namespace, the
          <code>uri</code>
          property of the associated QName object is set to the global default namespace. If the QName object of an XML  
attribute is specified without identifying a namespace, the
          <code>uri</code>
          property is set to 
an empty string.
        </p>
        
            <p></p><p><a href="#includeExamplesSummary">View the examples</a></p><p><span class="classHeaderTableLabel">See also</span></p><div class="seeAlso"><a href="XML.html" target="">XML</a><br/><a href="XMLList.html" target="">XMLList</a><br/><a href="Namespace.html" target="">Namespace</a><br/><a href="http://www.ecma-international.org/publications/standards/Ecma-357.htm" target="mm_external">ECMAScript for XML (E4X) specification (ECMA-357 edition 2)</a></div><br/><hr></div><a name="propertySummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Properties</div><div class="showHideLinks"><div id="hideInheritedProperty" class="hideInheritedProperty"><a class="showHideLink" href="#propertySummary" onclick="javascript:setInheritedVisible(false,'Property');"><img class="showHideLinkImage" src="images/expanded.gif"> Hide Inherited Public Properties</a></div><div id="showInheritedProperty" class="showInheritedProperty"><a class="showHideLink" href="#propertySummary" onclick="javascript:setInheritedVisible(true,'Property');"><img class="showHideLinkImage" src="images/collapsed.gif"> Show Inherited Public Properties</a></div></div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableProperty"><tr><th>&nbsp;</th><th colspan="2">Property</th><th>Defined By</th></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="Object.html#constructor" class="signatureLink">constructor</a> : <a href="Object.html">Object</a><div class="summaryTableDescription">A reference to the class object or constructor function for a given object instance.</div></td><td class="summaryTableOwnerCol"><a href="Object.html">Object</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#localName" class="signatureLink">localName</a> : <a href="String.html">String</a><div class="summaryTableDescription">[read-only] The local name of the QName object.</div></td><td class="summaryTableOwnerCol">QName</td></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="Object.html#prototype" class="signatureLink">prototype</a> : <a href="Object.html">Object</a><div class="summaryTableDescription">[static] A reference to the prototype object of a class or function object.</div></td><td class="summaryTableOwnerCol"><a href="Object.html">Object</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#uri" class="signatureLink">uri</a> : <a href="String.html">String</a><div class="summaryTableDescription">[read-only] The Uniform Resource Identifier (URI) of the QName object.</div></td><td class="summaryTableOwnerCol">QName</td></tr></table></div><a name="methodSummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Methods </div><div class="showHideLinks"><div id="hideInheritedMethod" class="hideInheritedMethod"><a class="showHideLink" href="#methodSummary" onclick="javascript:setInheritedVisible(false,'Method');"><img class="showHideLinkImage" src="images/expanded.gif"> Hide Inherited Public Methods</a></div><div id="showInheritedMethod" class="showInheritedMethod"><a class="showHideLink" href="#methodSummary" onclick="javascript:setInheritedVisible(true,'Method');"><img class="showHideLinkImage" src="images/collapsed.gif"> Show Inherited Public Methods</a></div></div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableMethod"><tr><th>&nbsp;</th><th colspan="2">Method</th><th>Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#QName()" class="signatureLink">QName</a>(uri:<a href="Namespace.html">Namespace</a>, localName:<a href="QName.html">QName</a>)</div><div class="summaryTableDescription">Creates a QName object with a URI object from a Namespace object and a localName from a QName object.</div></td><td class="summaryTableOwnerCol">QName</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#QName2()" class="signatureLink">QName</a>(qname:<a href="QName.html">QName</a>)</div><div class="summaryTableDescription">Creates a QName object that is a copy of another QName object.</div></td><td class="summaryTableOwnerCol">QName</td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="Object.html#hasOwnProperty()" class="signatureLink">hasOwnProperty</a>(name:<a href="String.html">String</a>):<a href="Boolean.html">Boolean</a></div><div class="summaryTableDescription">Indicates whether an object has a specified property defined.</div></td><td class="summaryTableOwnerCol"><a href="Object.html">Object</a></td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="Object.html#isPrototypeOf()" class="signatureLink">isPrototypeOf</a>(theClass:<a href="Object.html">Object</a>):<a href="Boolean.html">Boolean</a></div><div class="summaryTableDescription">Indicates whether an instance of the Object class is in the prototype chain of the object specified 
  as the parameter.</div></td><td class="summaryTableOwnerCol"><a href="Object.html">Object</a></td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="Object.html#propertyIsEnumerable()" class="signatureLink">propertyIsEnumerable</a>(name:<a href="String.html">String</a>):<a href="Boolean.html">Boolean</a></div><div class="summaryTableDescription">Indicates whether the specified property exists and is enumerable.</div></td><td class="summaryTableOwnerCol"><a href="Object.html">Object</a></td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="Object.html#setPropertyIsEnumerable()" class="signatureLink">setPropertyIsEnumerable</a>(name:<a href="String.html">String</a>, isEnum:<a href="Boolean.html">Boolean</a> = true):<a href="specialTypes.html#void">void</a></div><div class="summaryTableDescription">Sets the availability of a dynamic property for loop operations.</div></td><td class="summaryTableOwnerCol"><a href="Object.html">Object</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#toString()" class="signatureLink">toString</a>():<a href="String.html">String</a></div><div class="summaryTableDescription">Returns a string composed of the URI, and the local name for the 
 QName object, separated by "::".</div></td><td class="summaryTableOwnerCol">QName</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#valueOf()" class="signatureLink">valueOf</a>():<a href="QName.html">QName</a></div><div class="summaryTableDescription">Returns the QName object.</div></td><td class="summaryTableOwnerCol">QName</td></tr></table></div><script language="javascript" type="text/javascript"><!--
                      showHideInherited();
                      --></script><div class="MainContent"><div class="detailSectionHeader">Property Detail</div><a name="propertyDetail"></a><a name="localName"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">localName</td><td class="detailHeaderType">property</td></tr></table><div class="detailBody"><code>localName:<a href="String.html">String</a></code>&nbsp;&nbsp;[read-only] <p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>The local name of the QName object.</p><br/><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get localName():<a href="String.html">String</a></code><br/></div><a name="propertyDetail"></a><a name="uri"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">uri</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>uri:<a href="String.html">String</a></code>&nbsp;&nbsp;[read-only] <p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>The Uniform Resource Identifier (URI) of the QName object.</p><br/><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get uri():<a href="String.html">String</a></code><br/></div><a name="constructorDetail"></a><div class="detailSectionHeader">Constructor Detail</div><a name="QName()"></a><a name="QName(Namespace,QName)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">QName</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">Constructor</td></tr></table><div class="detailBody"><code>public function QName(uri:<a href="Namespace.html">Namespace</a>, localName:<a href="QName.html">QName</a>)</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p>
          Creates a QName object with a URI object from a Namespace object and a
          <code>localName</code>
          from a QName object.
    If either parameter is not the expected data type, the parameter is converted to a string and 
    assigned to the corresponding property of the new QName object.
    For example, if both parameters are strings, a new QName object is returned with a
          <code>uri</code>
          property set
    to the first parameter and a
          <code>localName</code>
          property set to the second parameter.
    In other words, the following permutations, along with many others, are valid forms of the constructor:
          <pre>QName (uri:Namespace, localName:String);
QName (uri:String, localName: QName);
QName (uri:String, localName: String);</pre>
          
          <p>
            If you pass
            <code>null</code>
            for the
            <code>uri</code>
            parameter, 
    the
            <code>uri</code>
            property of the new QName object is set to
            <code>null</code>
            .
          </p>
          
          <p>
            <b>Note:</b>
            This class shows two constructor entries because each form accepts 
    different parameters. The constructor behaves differently depending on the type and number of 
    parameters passed, as detailed in each entry. ActionSript 3.0 does not support method or constructor overloading.
          </p>
          
        </p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">uri</span>:<a href="Namespace.html">Namespace</a></code> &mdash; 
              A Namespace object from which to copy the
              <code>uri</code>
              value. A parameter of any other type is converted to a string.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">localName</span>:<a href="QName.html">QName</a></code> &mdash; 
              A QName object from which to copy the
              <code>localName</code>
              value. A parameter of any other type is converted to a string.
            </td></tr></table></div><a name="QName2()"></a><a name="QName(QName)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">QName</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">Constructor</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>public function QName(qname:<a href="QName.html">QName</a>)</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p>
          Creates a QName object that is a copy of another QName object. If the parameter passed 
    to the constructor is a QName object, a copy of the QName object is created. If the parameter 
    is not a QName object, the parameter is converted to a string and assigned to the
          <code>localName</code>
          property of the new QName instance. 
    If the parameter is
          <code>undefined</code>
          or unspecified, a new QName object
    is created with the
          <code>localName</code>
          property set to the empty string.
          <p>
            <b>Note:</b>
            This class shows two constructor entries because each form accepts 
    different parameters. The constructor behaves differently depending on the type and number of 
    parameters passed, as detailed in each entry. ActionSript 3.0 does not support method or constructor overloading.
          </p>
          
        </p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">qname</span>:<a href="QName.html">QName</a></code> &mdash; 
              The QName object to be copied. Objects of any other type are 
    converted to a string that is assigned to the
              <code>localName</code>
              property
    of the new QName object.
            </td></tr></table></div><a name="methodDetail"></a><div class="detailSectionHeader">Method Detail</div><a name="toString()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">toString</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td></tr></table><div class="detailBody"><code> <a href="statements.html#AS3">AS3</a> function toString():<a href="String.html">String</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Returns a string composed of the URI, and the local name for the 
 QName object, separated by "::".
          <p>
            The format depends on the
            <code>uri</code>
            property of the QName object:
          </p>
          
          <pre>
            If
            <code>uri</code>
            == ""
            <code>toString</code>
            returns
            <code>localName</code>
            else if
            <code>uri</code>
            == null
            <code>toString</code>
            returns *::
            <code>localName</code>
            else
            <code>toString</code>
            returns
            <code>uri</code>
            ::
            <code>localName</code>
          </pre>
          
        </p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="String.html">String</a></code> &mdash; The qualified name, as a string.</td></tr></table></div><a name="valueOf()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">valueOf</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> <a href="statements.html#AS3">AS3</a> function valueOf():<a href="QName.html">QName</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>Returns the QName object.</p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="QName.html">QName</a></code> &mdash; The primitive value of a QName instance.</td></tr></table></div><a name="includeExamplesSummary"></a><div class="detailSectionHeader">Examples<span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span></div><div class="exampleHeader">QNameExample.as</div><br/><div class="detailBody">
        The following example shows how to create a QName instance and use it to select XML elements.
 Two ways of creating a QName are shown:
        <ol><li>
            Creating a Namespace instance and then using it as input to the QName constructor. 
      This approach is best if you want to use the
            <code>Namespace.prefix</code>
            property for other 
      purposes later.
          </li><li>
            Creating a QName instance using a simple string value for the
            <code>uri</code>
            parameter in the QName constructor.
          </li></ol>
        
        <p>This code does the following things:</p>
        
        <ol><li>
            Defines an XML variable named
            <code>rssXML</code>
            .
          </li><li>
            Creates a new Namespace object with the prefix
            <code>dc</code>
            .
          </li><li>
            Creates a new QName object using the Namespace object and the local name
            <code>creator</code>
            .
          </li><li>
            Calls the
            <code>showDescendants()</code>
            method, which uses the
            <code>XML.descendants()</code>
            method to get an XMLList instance 
      containing all the descendant elements whose qualified name matches the given QName instance.
          </li><li>
            Displays the qualified name and the text value of each element in the list using a
            <code>for each</code>
            loop.
          </li><li>
            Creates another QName object using a string value for the
            <code>uri</code>
            parameter and the local name
            <code>date</code>
            .
          </li><li>
            Calls the
            <code>showDescendants()</code>
            method again to display the name and text value of the descendant elements.
          </li></ol>
        
        <div class="listing"><pre>package
{
    import flash.display.Sprite;
    
    public class QNameExample extends Sprite
    {
        public function QNameExample()
        {
            var rssXML:XML =  &lt;rdf:RDF
              xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
              xmlns="http://purl.org/rss/1.0/"
              xmlns:dc="http://purl.org/dc/elements/1.1/"&gt;
              &lt;channel rdf:about="http://www.xml.com/cs/xml/query/q/19"&gt;
                &lt;title&gt;Test RSS&lt;/title&gt;
                &lt;link&gt;http://www.adobe.com/&lt;/link&gt;
                &lt;description&gt;This is a test RSS document.&lt;/description&gt;
                &lt;language&gt;en-us&lt;/language&gt;
                &lt;items&gt;
                  &lt;rdf:Seq&gt;
                &lt;rdf:li rdf:resource="http://www.adobe.com/devnet/flash/"/&gt;
                &lt;rdf:li rdf:resource="http://www.adobe.com/devnet/flex/"/&gt;
                  &lt;/rdf:Seq&gt;
                &lt;/items&gt;
              &lt;/channel&gt;
              &lt;item rdf:about="http://www.adobe.com/devnet/flash/"&gt;
                &lt;title&gt;Flash Developer Center&lt;/title&gt;
                &lt;link&gt;http://www.adobe.com/devnet/flash/&lt;/link&gt;
                &lt;description&gt;Welcome to the Flash Developer Center&lt;/description&gt;
                &lt;dc:creator&gt;Adobe&lt;/dc:creator&gt;
                &lt;dc:date&gt;2005-08-08&lt;/dc:date&gt;    
              &lt;/item&gt;
              &lt;item rdf:about="http://www.adobe.com/devnet/flex/"&gt;
                &lt;title&gt;Flex Developer Center&lt;/title&gt;
                &lt;link&gt;http://www.adobe.com/devnet/flex/&lt;/link&gt;
                &lt;description&gt;Welcome to the Flex Developer Center&lt;/description&gt;
                &lt;dc:creator&gt;Adobe&lt;/dc:creator&gt;
                &lt;dc:date&gt;2005-10-16&lt;/dc:date&gt;    
              &lt;/item&gt;
            &lt;/rdf:RDF&gt;;
            
            var dcNamespace:Namespace = new Namespace("dc", "http://purl.org/dc/elements/1.1/");
            var creatorQName:QName = new QName(dcNamespace, "creator");
            trace(creatorQName.uri); // http://purl.org/dc/elements/1.1/
            trace(creatorQName.localName); // creator
            
            showDescendants(rssXML, creatorQName);
            
            var dateQName:QName = new QName("http://purl.org/dc/elements/1.1/", "date");
            trace(dateQName.uri); // http://purl.org/dc/elements/1.1/
            trace(dateQName.localName); // date
            
            showDescendants(rssXML, dateQName);
        }
        
        public function showDescendants(xmlData:XML, qualifiedName:QName):void
        {
            var decendantList:XMLList = xmlData.descendants(qualifiedName);
            
            for each (var element:XML in decendantList)
            {
                trace(element.name()); // the fully qualified name, 
                                       // like "http://purl.org/dc/elements/1.1/::creator"
                trace(element); // the simple text value of each element, like "Adobe"
            }                
        }
    }
}</pre></div>
      </div><br/><br/><hr><br/><p></p><center class="copyright"> &copy; 2004-2008 Adobe Systems Incorporated. All rights reserved. <br/>Thu Oct 30 2008, 07:08 PM -07:00  </center><div style="display:none">QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName QName </div></div></body></html><!-- &copy; 2004-2008 Adobe Systems Incorporated. All rights reserved. <br/>Thu Oct 30 2008, 07:08 PM -07:00  -->
