• Oleg Netchaev (5/20/2010)


    select * from #t for xml auto, root('rows');

    This will prevent the problems with XML segment problem as the result will include the root element.

    Nope, doesn't work for me, I still get the error "An invalid character was found in text context".

    Can someone tell me why the answer "XML segment, that is invalid in any environment" is incorrect?

    Even the explanation seems to say that this is the correct answer

    'Most of chars used in example are invalid in XML, see http://www.w3.org/TR/REC-xml#charsets.'