Extracting fields from DOM document