nsNameSpaceMap::const_iterator last = mNameSpaces.last(); for (nsNameSpaceMap::const_iterator iter = mNameSpaces.first(); iter != last; ++iter) serializer->AddNameSpace(iter->mPrefix, iter->mURI);
if (! hasMore) break;
RDFXMLDataSourceImpl::Serialize(nsIOutputStream* aStream){    nsresult rv;    nsCOMPtr<nsIRDFXMLSerializer> serializer        = do_CreateInstance("@mozilla.org/rdf/xml-serializer;1", &rv);    if (! serializer)        return rv;    rv = serializer->Init(this);    if (NS_FAILED(rv)) return rv;    // Add any namespace information that we picked up when reading    // the RDF/XML    nsNameSpaceMap::const_iterator last = mNameSpaces.last();    for (nsNameSpaceMap::const_iterator iter = mNameSpaces.first(); iter != last; ++iter)        serializer->AddNameSpace(iter->mPrefix, iter->mURI);    // Serialize!    nsCOMPtr<nsIRDFXMLSource> source = do_QueryInterface(serializer);    if (! source)        return NS_ERROR_FAILURE;    return source->Serialize(aStream);}