/** * Parses a value through a path. This will find the element or attribute * that is at the end of the path, and parse the value into the element's * text content or the attribute's value as appropriate. */ public void parse(Element element, ElementMetadata<?, ?> metadata, Object value) throws ParseException { Path bound = path.toAbsolute(metadata); element = createFinalElement(path, element); if (bound.selectsAttribute()) { parseAttributeValue(element, bound.getSelectedElement(), bound.getSelectedAttributeKey(), bound.getSelectedAttribute(), value); } else { parseTextValue(element, bound.getSelectedElement(), value); } } }
/** * Parses a value through a path. This will find the element or attribute * that is at the end of the path, and parse the value into the element's * text content or the attribute's value as appropriate. */ public void parse(Element element, ElementMetadata<?, ?> metadata, Object value) throws ParseException { Path bound = path.toAbsolute(metadata); element = createFinalElement(path, element); if (bound.selectsAttribute()) { parseAttributeValue(element, bound.getSelectedElement(), bound.getSelectedAttributeKey(), bound.getSelectedAttribute(), value); } else { parseTextValue(element, bound.getSelectedElement(), value); } } }
/** * Parses a value through a path. This will find the element or attribute * that is at the end of the path, and parse the value into the element's * text content or the attribute's value as appropriate. */ public void parse(Element element, ElementMetadata<?, ?> metadata, Object value) throws ParseException { Path bound = path.toAbsolute(metadata); element = createFinalElement(path, element); if (bound.selectsAttribute()) { parseAttributeValue(element, bound.getSelectedElement(), bound.getSelectedAttributeKey(), bound.getSelectedAttribute(), value); } else { parseTextValue(element, bound.getSelectedElement(), value); } } }