Hi, Dan Thank you for advice. > Instead of doing this: > > > + mac_index = (str(doc).upper()).find(mac.upper()) > > + if mac_index == -1: > > + continue > > + mac_comp = str(doc)[mac_index:mac_index+17] > > > Can't you simply use the 'lower-case()' function in XPath ? > > eg something like > > count(/domain/devices/interface/mac[lower-case(@address)=lower-case('%s')]) > But, the 'lower-case()' function is not included in XPath 1.0 and is included in XPath 2.0. libxml only implements XPath 1.0. The 'translate()' function may simplify it. Thanks, Shigeki Sakamoto. _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/et-mgmt-tools