C# detecting partial xml data?

I’m connecting to an xmpp chat server “riot’s pvp.net” using an TCP/ssl stream, the server sometimes splits up large messages “xmpp xml based messages” into chunks, is there a built in “& efficient if possible” way to detect if the data I received represent a partial xml data, to wait for the next response/receive to combine the data together?
I found this JavaScript code that supposedly does that, I don’t understand Javascript and can’t even tell if it does indeed do so right, or not and was wondering if there’s a more elegant or built in way to do that in c#?