%  rmfield - remove elements and attributes from an xml-object which satisfy   
%            the indexing 'sub'   
%   
%  CALL:   
%   rmfield(obj,sub)   
%   
%  INPUT:   
%   obj: <xml-object>   
%   sub: <string> index into xml document (same format as indexing into   
%                 Matlab structures) e.g. 'book(1)' or 'book(1).title'   
%                 result in the same substructs as would be obtained if   
%                 S.book(1)or S.book(1).title were used (S a Matlab   
%                 structure)   
%        <string> with xpath expression   
%   
%  OUTPUT:   
%   none, the xml-object is updated   
%   
%  EXAMPLE:   
%   %create an xml from a sourcefile   
%   obj = xml(fullfile(pwd,'examples','books.xml'))   
%   rmfield(obj,'book(1:2)')   
%   rmfield(obj,'book(2).@category')   
%   inspect(obj)   
%   
%   %examples with xpath expression   
%   obj = xml(fullfile(pwd,'examples','books.xml'))   
%   %remove books cheaper than 30 euro   
%   rmfield(obj,'bookstore/book[price < 30]')   
%   inspect(obj)   
%   
%   obj = xml(fullfile(pwd,'examples','books.xml'))   
%   %remove books in the category 'WEB'   
%   rmfield(obj,'bookstore/book[@category = ''WEB'']')   
%   inspect(obj)   
%   
%  See also: xml, xml/fieldNames, xml/isfield   
   
   
% © Modelit 2006-2020   
% Matlab release: 2020a   
% Date: 2020/10/13 15:10:37   
% Revision: 1.08   
