- var XMLobj = (new DOMParser()).parseFromString(theString, "text/xml")
the problem that i am facing is the string that is to be passed to the parseFromString method is a xmlstring. i have an xml file stored in my local file system. but,when i read the file using javascript it is assigned to a javascript string n i m getting a parseerror when i try parse it using parseFromString method.