1

I have an .xml file. The tags inside are:

<Info>Product</Info>

Now, I have 20 000 tags like this in the file. One tag however, starts properly but it is missing a proper closing tag. How can I find which line starts properly but does not end with the proper tag?

Thanks.

1

1 Answer 1

5

Regular expressions is usually not the best tool for xml. It's usually better to use some kind of parser specially written for xml. For xml verification you may want to try xmllint tool

1
  • 1
    Especially since an XML parser knows what XML is supposed to look like and can show exactly where the error is without the trial-and-error of refining a regex for the specific case. Mar 18, 2012 at 21:48

Not the answer you're looking for? Browse other questions tagged .