Prev: Eyewitness account of the 7- Colombian youth -important
Next: Question about Monitoring Share Permissions
From: SpaceMarine on 23 Sep 2010 15:00 hello, im using VBScript to open generated .XML files off the local file system and do stuff with them. the problem i'm running into is: sometimes the .XML is invalid and contains an ampersand that is not qualified. ex: <FOO>$.01 & Greater</FOO> ....which causes problems when i attempt to load via: Dim xml : Set xml = CreateObject("Microsoft.XMLDOM") xml.async = "false" If xml.load(sXmlPath) Then '[do stuff] Else '[report error] End If what can i do? is there a way get back an exact line # for the failure to load, and then perform some string manipulation on it? thanks! sm
From: SpaceMarine on 23 Sep 2010 15:26
On Sep 23, 2:00 pm, SpaceMarine <spacemar...(a)mailinator.com> wrote: > what can i do? is there a way get back an exact line # for the failure > to load, and then perform some string manipulation on it? examining the XML object i did find some properties to help w/ run- time adjustments to the XML: xml.ParseError.Reason xml.ParseError.Line ....i can probably use these to open the text file to the proper line and replace "& " with "& " sm |