मैं नीचे xml फ़ाइल है
cat example.xml
<?xml version="1.0" encoding="UTF-8"?>
<TestConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Text>
<Checking state="BOOT" />
<function name="configure" type="test" username="user1" num="1" Mode="NA" Type="OPEN" txt="NA-TO" TextType="guest" who="BANANNA"/>
<function name="configure" type="test" username="user2" num="2" Mode="YA" Type="DYNAMIC-WEP" txt="NA-TO" TextType="employee" who="BANANNA" />
<function name="configure" type="test" username="user3" num="3" Mode="YA" Type="DYNAMIC-WEP" txt="NA-TO" TextType="employee" who="BANANNA"/>
<function name="configure" type="test" username="user4" num="4" Mode="YA" Type="WPA2-PSK" txt="CA-TO" TextType="employee" who="BANANNA">
<parameters name="_key" value="password" isit="true" />
</function>
<function name="configure" type="test" username="user5" num="5" Mode="YA" Type="WPA2-PSK" txt="CA-TO" TextType="employee" who="BANANNA">
<parameters name="_key" value="password" isit="true" />
</function>
<function name="configure" type="test" username="user6" num="7" Mode="YA" Type="WPA2-PSK" TextType="employee" who="BANANNA">
<parameters name="_key" value="password" isit="true" />
</function>
</Text>
</TestConfig>
इस फ़ाइल में, मैं 5 से पंक्ति को बदलना चाहूंगा
<function name="configure" type="test" username="user1" num="1" Mode="NA" Type="OPEN" txt="NA-TO" TextType="guest" who="BANANNA"/>
सेवा
<function name="configure" type="test" username="user1" num="1" Mode="YA" Type="WPA2-PSK" txt="NA-TO" TextType="guest" who="BANANNA">
<parameters name="_key" value="password" isit="true" />
</function>
<function .* />
?