Skip to main content.
home | support | download

Back to List Archive

Re: Find empty xml tags.

From: Peter Karman <peter(at)not-real.peknet.com>
Date: Fri Jul 21 2006 - 14:46:10 GMT
This is not possible with Swish-e as far as I can tell. Swish-e only indexes 
what is present, not what is absent.

You could likely solve this by filtering your docs and passing to -S prog. Some 
simple regexp like:

  s,<(\w+)(.*?)>\s*</\1>,<$1$2>_no_tag_content_</$1>,gs;

would probably catch most of them. Then you could search for '_no_tag_content_' 
and find them that way.

pek

Carmelo Carchedi scribbled on 7/20/06 12:39 PM:
> If I have an XML file and inside I have empty tags, how can i find file 
> with empty tags?
> 
> es,:
> <a_file>
> with some text and an empty tag like...
> <this_tag></this_tag>
> ok?
> </a_file>
> 

-- 
Peter Karman  .  http://peknet.com/  .  peter(at)not-real.peknet.com
Received on Fri Jul 21 07:46:17 2006