Delete xml element with javascript function

已完成 已发布的 Jul 12, 2014 货到付款
已完成 货到付款

I have an XML Data library of items.

What I need a javascript function that deletes a selected element on a button click.

Here is the structure:

<items>

<item>

<Id>1</Id>

<Nr>1</Nr>

<Name>Title 1</Name>

<Description>Description 1</Description>

<SelectedItemOpt1>Option 1.0</SelectedItemOpt1>

<SelectedItemOpt2>Option 1.1</SelectedItemOpt2>

<SelectedItemOpt3>Option 1.2</SelectedItemOpt3>

<SelectedItemType>Option 1.3</SelectedItemType>

<SelectedItemPrice>Price 1</SelectedItemPrice>

<SelectedDrinkType>Drink 1</SelectedDrinkType>

<SelectedItemIng>Ing Type 1</SelectedItemIng>

<Note>Note 1</Note>

<ItemQty>1</ItemQty>

</item>

<item>

<Id>2</Id>

<Nr>2</Nr>

<Name>Title 2</Name>

<Description>Description 2</Description>

<SelectedItemOpt1>Option 2.0</SelectedItemOpt1>

<SelectedItemOpt2>Option 2.1</SelectedItemOpt2>

<SelectedItemOpt3>Option 2.2</SelectedItemOpt3>

<SelectedItemType>Option 2.3</SelectedItemType>

<SelectedItemPrice>Price 2</SelectedItemPrice>

<SelectedDrinkType>Drink 2</SelectedDrinkType>

<SelectedItemIng>Ing Type 2</SelectedItemIng>

<Note>Note 2</Note>

<ItemQty>2</ItemQty>

</item>

<item>

<Id>3</Id>

<Nr>3</Nr>

<Name>Title 3</Name>

<Description>Description 3</Description>

<SelectedItemOpt1>Option 3.0</SelectedItemOpt1>

<SelectedItemOpt2>Option 3.1</SelectedItemOpt2>

<SelectedItemOpt3>Option 3.2</SelectedItemOpt3>

<SelectedItemType>Option 3.3</SelectedItemType>

<SelectedItemPrice>Price 3</SelectedItemPrice>

<SelectedDrinkType>Drink 3</SelectedDrinkType>

<SelectedItemIng>Ing Type 3</SelectedItemIng>

<Note>Note 3</Note>

<ItemQty>3</ItemQty>

</item>

<item>

<Id>4</Id>

<Nr>4</Nr>

<Name>Title 5</Name>

<Description>Description 5</Description>

<SelectedItemOpt1>Option 5.0</SelectedItemOpt1>

<SelectedItemOpt2>Option 5.1</SelectedItemOpt2>

<SelectedItemOpt3>Option 5.2</SelectedItemOpt3>

<SelectedItemType>Option 5.3</SelectedItemType>

<SelectedItemPrice>Price 5</SelectedItemPrice>

<SelectedDrinkType>Drink 5</SelectedDrinkType>

<SelectedItemIng>Ing Type 5</SelectedItemIng>

<Note>Note 5</Note>

<ItemQty>5</ItemQty>

</item>

</items>

So lets say I would want to delete item with Id == 3, I click a button and remove completely from the list

Best regards

Dave

JavaScript XML

项目ID: #6180017

关于项目

5个方案 远程项目 活跃的Jul 12, 2014

授予:

CBabbage

please check my profile for the javascript projects i have been completing, I can write the function for you. please PM me with the details and we can start right away. Best Regards.

$15 USD 在0天内
(17条评论)
4.1

有5名威客正在参与此工作的竞标,均价$15/小时

sdgcode

Hi , I have finished your project. When you award project I will send you code. PS read my reviews. Regards

$15 USD 在0天内
(75条评论)
6.6
madhavan03

Ready to start. Very good expertise in web technologies. Can finish this project efficiently. I have more than 9 years of experience in web technologies. I have very good experience in development of websites and 更多

$15USD 在1天里
(6条评论)
4.8
greenlikeorange

A proposal has not yet been provided

$15 USD 在0天内
(0条评论)
0.0
beginner1234

i'm new here at freelancer but i've done this before. i'll send immediately the file once i found it in my drive as long as you grant me this project.

$15USD 在1天里
(0条评论)
0.0