Jump to content

PHP Search XML by Line/Column No.


kool_samule

Recommended Posts

Hi Chaps,

 

I have been given an invalid XML file, which when run through 3rd party software, gives me the line & column numbers of the error.

 

Instead of opening the file and manually searching for the line/column numbers (which can take a whie, as the file is vast!), is there a way to parse the XML file and locate the error, using the line/column numbers? And maybe display/highlight the error in a browser?

 

e.g.:

1: open bad-file.xml

2: read bad-file.xml

3. go-to line 50

4. go-to column 3620

5. open in browser

6. highlight error

 

Cheers

 

S

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.