Looking for script to create a xml file


I need a script which I can add,Delete, Search, Edit data in the xml file.

Within xml file I would like to have 3 element and then with in each element would like to have unlimited keys with data.

For eaxample.

<Office 365>HR</Office365>
<Office 2010>IT, Collector</Office2010>

<Adobe>Reader, Player</Adobe>

<p1>Work after 1pm, Work from home</p1>
<p10>Work after 1pm, Work from desk</p10>


Run the command Get-Command XML and there are several that are of interest especially ConvertTo-XML. You can also use the type accelerator below to read in an XML file:

$xml = [xml] (get-content xmlfile.xml)

Good luck.

How do I add new element or edit new element within my xml file.


This command reads the xml file but how can i use as search/add/edit/delete

$xml = [xml] (get-content xmlfile.xml)