The original post said that the MathML units code was just a small part of a much larger technical specification document, so something like XPath or XML::Twig will be required to extract it. I don't suppose you would want to write an XSLT translation specification for the entire document just to get the units.