Here is how you select an element without a specific attribute:
B[@C=''] selects B that has no C attribute or has attributePlease refer to here.
with empty value.
B[not(@C)] seelcts b that don't have a C attribute
B[not(@*)] selects B that have no attribute.