go to a line and replace

I have a file (say file1.txt) and I have to search for a line which has a text replace it and replace another string too in the same line.
Eg:
file1.txt
--------

x='hai' y='world' z='unix'
x='hai'
y='world'
x='hai' z='perl' y='world'

I have to go to line which has x='hai' and y='world' and replace
x='hai' to x='hello' and y='world' to y='universe' as below

modified file

x='hello' y='universe' z='unix'
x='hai'
y='world'
x='hello' z='perl' y='universe'

Can you please give me a command of shell program to do that

Thanks
Ammu

 sed 's/\(.*\)\(hai\)\(.*\)\(world\)\(.*\)/\1hello\3universe\5/' yourfile
awk 'BEGIN{
 q="\047"
 o1="x="q "hai"q
 o2="y="q"world"q
 c1="x="q "hello"q
 c2="y="q"universe"q
}
$0 ~ o1 && $0 ~ o2{
 sub(o1,c1)
 sub(o2,c2) 
}1' file

Thanks

This code will only work when the 'x=hai' part is before 'y=universe'. When it is not the case, you may find the following code useful (here, as a script file)

    #!/bin/sed -f
    /x='hai'/ {
        s/y='world'/y='universe'/
        t a
        b
        :a
        s/x='hai'/x='hello'/
    }

use this

nawk '(NF>1) {gsub(/hai/,"heloo",$0) ; gsub(/world/,"universe",$0) ; print }' file1.txt 

BR