The 3DS and 3DS XL do not have a HDMI input and neither has Nintendo made a HDMI cable so it cannot be connected by a HDMI cable to your TV.
The only way of connecting your 3DS to your TV as far as I know is from a capture board. A capture board is a non Nintendo licensed product that connects to your TV through a USB connection. As far as I know you cannot buy it in any stores but there are individual people who sell it.
An example of this can be found at: http://3dscapture.com/
I hope I was of some assistance I would just like to point out that I have not used this product nor am I going to so if you are considering buying it I suggest you look at review and comments about the item and also to find out if there are any consequences to using it such as screwing up your 3DS etc.