Find and replace in Quarkxpress 6.5

Hi,

I am writing a applescript to Find a text and Replace with another text. For example figure 1.1 to figure 2.1.

The script works fine as long as there is no hidden XML tags in the quark document. That is, if the text is figure 1.1, then it is easily changed. But if there is some hidden xml tags between figure and 1.1, let say figure 1.1, then the script will not change that number.

Note: Here and tags are hidden in Quark document.

Can anybody know how to search the text in quarkxpress document by ignoring hidden xml tags.

My script is:

tell application "QuarkXPress"
	tell document 1
		try
			set every text of every story where it is "figure 1.1" to "figure 2.1"
		end try
	end tell
end tell

Can I get any help for this.