rc = document->CreateElementNS(ns, aName, _retval);
rc = document->CreateElementNS(ns, aName, getter_AddRefs(element));
EncodeSimpleValue(nsISOAPEncoding * aEncoding,                  const nsAString & aValue,                  const nsAString & aNamespaceURI,                  const nsAString & aName,                  nsISchemaType * aSchemaType,                  nsIDOMElement * aDestination, nsIDOMElement ** _retval){  nsAutoString ns;  nsresult rc = aEncoding->GetExternalSchemaURI(aNamespaceURI, ns);  if (NS_FAILED(rc))    return rc;  nsCOMPtr < nsIDOMDocument > document;  rc = aDestination->GetOwnerDocument(getter_AddRefs(document));  if (NS_FAILED(rc))    return rc;  nsCOMPtr < nsIDOMElement > element;  rc = document->CreateElementNS(ns, aName, _retval);  if (NS_FAILED(rc))    return rc;  nsCOMPtr < nsIDOMNode > ignore;  rc = aDestination->AppendChild(*_retval, getter_AddRefs(ignore));  if (NS_FAILED(rc))    return rc;  if (aSchemaType) {    nsAutoString name;    rc = aSchemaType->GetName(name);    if (NS_FAILED(rc))      return rc;    rc = aSchemaType->GetTargetNamespace(ns);    if (NS_FAILED(rc))      return rc;    nsAutoString type;    rc = nsSOAPUtils::MakeNamespacePrefix(aEncoding, *_retval,                                            ns, type);    if (NS_FAILED(rc))      return rc;    type.Append(nsSOAPUtils::kQualifiedSeparator);    type.Append(name);    rc = aEncoding->GetExternalSchemaURI(nsSOAPUtils::kXSIURI, ns);    if (NS_FAILED(rc))      return rc;    rc = (*_retval)->        SetAttributeNS(ns, nsSOAPUtils::kXSITypeAttribute, type);  }  if (!aValue.IsEmpty()) {    nsCOMPtr < nsIDOMText > text;    rc = document->CreateTextNode(aValue, getter_AddRefs(text));    if (NS_FAILED(rc))      return rc;    return (*_retval)->AppendChild(text, getter_AddRefs(ignore));  }  return rc;}