sreehari
sreehari

Reputation: 89

How to Remove outer element in xml using Jquery

i am getting below xml, i want to remove outer root element in jquery. Can anyone please help on us.

<root ABC="YYYYY"> <Row trancid="1" trancname="XXXXXXXX" selected="0" row_dst="0" /> </root>

Thanks! in advance.

Upvotes: 0

Views: 143

Answers (1)

Milind Anantwar
Milind Anantwar

Reputation: 82251

You can get the html of root element to use content without parent root node:

var str = '<root ABC="YYYYY"><Row trancid="1" trancname="XXXXXXXX" selected="0" row_dst="0" /></root>';
str = $(str).html()

Upvotes: 2

Related Questions