shell - wanted to use results of find command in custom script that i am building -
i want validate xml's well-formed ness, of files not having single root (which fine per business req eg. <ri>...</ri><ri>..</ri> valid xml in context) , xmlwf can this, flags out file if it's not having single root, wanted build custom script internally uses xmlwf, custom script should below,
iterate through list of files passed input (eg. sample.xml or s*.xml or *.xml) each file prepare temporary file <a>+contents of file+</a> , call xmlwf on temp file, can 1 on this?
you add text beginning , end of file using cat , bash, file has root added validation purposes.
cat <(echo '<root>') sample.xml <(echo '</root>') | xmlwf
this way don't need write temporary files out.
Comments
Post a Comment