Fastest way to convert string to XML
Hey guys - Got a a question.

we have got an XMLIDList helper which uses += ( :( )

What im looking for is the fastest possible way to do this. Its not been a problem before because the lists have been <10 items but we have added a new feature that can pass 15k items and as you can imagine.. its dog slow!

   
      public static string EncodeGuidListToXML(IList<Guid> elementsToEncode)
            {
                if (elementsToEncode == null || elementsToEncode.Count == 0)
                    return String.Empty;
    
                string beginItemNode = BeginItemNode;
                string endItemNode = EndItemNode; 
                
                string xml = BeginRootNode;
    
                foreach (Guid item in elementsToEncode)
                {
                    xml += beginItemNode + item.ToString().ToUpper() + endItemNode;
                }
    
                xml += EndRootNode;
    
                return xml;
            }

Thanks.
Fastest way to convert string to XML
===

Hey guys - Got a a question.

we have got an XMLIDList helper which uses += ( :( )

What im looking for is the fastest possible way to do this. Its not been a problem before because the lists have been <10 items but we have added a new feature that can pass 15k items and as you can imagine.. its dog slow!

   
      public static string EncodeGuidListToXML(IList<Guid> elementsToEncode)
            {
                if (elementsToEncode == null || elementsToEncode.Count == 0)
                    return String.Empty;
    
                string beginItemNode = BeginItemNode;
                string endItemNode = EndItemNode; 
                
                string xml = BeginRootNode;
    
                foreach (Guid item in elementsToEncode)
                {
                    xml += beginItemNode + item.ToString().ToUpper() + endItemNode;
                }
    
                xml += EndRootNode;
    
                return xml;
            }

Thanks.