Menu

Can't Load XML Document

Help
2008-11-14
2013-01-15
  • edi budiman

    edi budiman - 2008-11-14

    I'm using XpParser and my simple coding look's like this :

    Parser.NormalizeData:=True;
    try
      if Parser.ParseDataSource(edit1.Text) then
        ShowMessage('Parse succeeded!')
      else
        ShowMessage('Parse failed!');
    except
    on E: EXpParserError do
      ShowMessageFmt('Error on line: %d position: %d abs at: %d error msg: %s',
                             [E.Line, E.LinePos, E.FilePos, E.Reason]);
    end;

    it is like in the example, but it won't run and show message error access violation.
    can somebody explain about this error?

     
    • Richard Light

      Richard Light - 2008-11-24

      Hi,

      There is no obvious reason why you should get this error from the code you have written.  Obviously, it does depend what you put into your edit1 text box - this should be a valid filename.  And I'm assuming that your Parser object has been properly instantiated, e.g. by dropping a TXpParser object onto your form.

      Richard Light

       

Log in to post a comment.