how to convert Jquery Var content to XML Content

how to convert Jquery Var content to XML Content

Hi everyone, I am currently working with Jquery and my entire project needs to be done only using sharepoint Client Object Model (so i cant make use of server side coding). I have created a xml structure (by appending some string together) and stored it in a jquery var variable. Now my variable content looks like this

        <Collection xmlns="http://schemas.microsoft.com/collection/metadata/2009" xmlns:ui="http://schemas.microsoft.com/livelabs/pivot/collection/2009" SchemaVersion="1" Name="listname">
   
    <FacetCategories>
    <FacetCategory Name="Title" Type="String"/>
    <FacetCategory Name="Created By" Type="String"/>
    <FacetCategory Name="Modified By" Type="String"/>
   
    </FacetCategories>
    <Items ImgBase="http://460d87.dzc">
    <Item Id="0" Img="#0" Name="Name1" Href="http://site/1_.000">
    <Facets>
    <Facet Name="Title">
    <String Value="Name1"/>
    </Facet>
    </Facets>
    </Item>
    </Items>
    </collection>

I want to convert this variable in to xml content purely based on jquery.I have used ParseXml() Method but i'm not able to see the output in alert(). Please help me out with this.