Question about changing then passing XML
If I have an XML file, let's say a simple one called pets.xml:
Is there a way to, client side, change the xml so that different xml code gets passed to the variable uri? I do not want to edit the original xml file on the server; I want pets.xml to stay the same.
var uri = "pets.xml"
But I would like to be able to do search and replace over the entire xml file before the data gets passed to the uri variable.
For instance, I would like to somehow load the original pets.html file, then call a function to replace "terrier" with "collie" so that the xml now reads:
And somehow pass this -- object? -- to the uri var for the existing library to parse and handle.