Parse the value string and build the node list associated.
           Should produce a flat tree with only TEXTs and ENTITY_REFs.
496088
def stringGetNodeList(self, value):
        
        ret = libxml2mod.xmlStringGetNodeList(self._o, value)
        if ret is None:raise treeError('xmlStringGetNodeList() failed')
        __tmp = xmlNode(_obj=ret)
        return __tmp
713076
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'algn', 'val'
          @value = value_to_symbol(value)
        when 'leader'
          @leader = value_to_symbol(value)
        when 'pos'
          @position = OoxmlSize.new(value.value.to_f, position_unit(node))
        end
      end
      self
    end
4604
def _create_text_node(self, root, name, value, cdata=False):
        '''
        
        '''
        if is_empty_or_none(value):
            return

        if type(value) == date:
            value = date_to_string(value)

        if type(value) == datetime:
            value = datetime_to_string(value)

        if isinstance(value, Decimal):
            value = "0" if not value else str(value)

        tag = root.ownerDocument.createElement(name)
        value = value.decode('utf-8')
        if cdata:
            tag.appendChild(root.ownerDocument.createCDATASection(value))
        else:
            tag.appendChild(root.ownerDocument.createTextNode(value))

        return root.appendChild(tag)
540776
private Object value(Object obj, XmlParser.Node node) throws NoSuchMethodException,
            ClassNotFoundException, InvocationTargetException, IllegalAccessException
    {
        Object value = null;

        // Get the type
        String type = node.getAttribute("type");

        // Try a ref lookup
        String ref = node.getAttribute("ref");
        if (ref != null)
        {
            value = _idMap.get(ref);
        }
        else
        {
            // handle trivial case
            if (node.size() == 0)
            {
                if ("String".equals(type)) return "";
                return null;
            }

            // Trim values
            int first = 0;
            int last = node.size() - 1;

            // Handle default trim type
            if (type == null || !"String".equals(type))
            {
                // Skip leading white
                Object item = null;
                while (first <= last)
                {
                    item = node.get(first);
                    if (!(item instanceof String)) break;
                    item = ((String) item).trim();
                    if (((String) item).length() > 0) break;
                    first++;
                }

                // Skip trailing white
                while (first < last)
                {
                    item = node.get(last);
                    if (!(item instanceof String)) break;
                    item = ((String) item).trim();
                    if (((String) item).length() > 0) break;
                    last--;
                }

                // All white, so return null
                if (first > last) return null;
            }

            if (first == last)
                //  Single Item value
                value = itemValue(obj, node.get(first));
            else
            {
                // Get the multiple items as a single string
                StringBuffer buf = new StringBuffer();
                synchronized (buf)
                {
                    for (int i = first; i <= last; i++)
                    {
                        Object item = node.get(i);
                        buf.append(itemValue(obj, item));
                    }
                    value = buf.toString();
                }
            }
        }

        // Untyped or unknown
        if (value == null)
        {
            if ("String".equals(type)) return "";
            return null;
        }

        // Try to type the object
        if (type == null)
        {
            if (value != null && value instanceof String) return ((String) value).trim();
            return value;
        }

        if ("String".equals(type) || "java.lang.String".equals(type)) return value.toString();

        Class pClass = TypeUtil.fromName(type);
        if (pClass != null) return TypeUtil.valueOf(pClass, value.toString());

        if ("URL".equals(type) || "java.net.URL".equals(type))
        {
            if (value instanceof URL) return value;
            try
            {
                return new URL(value.toString());
            }
            catch (MalformedURLException e)
            {
                throw new InvocationTargetException(e);
            }
        }

        if ("InetAddress".equals(type) || "java.net.InetAddress".equals(type))
        {
            if (value instanceof InetAddress) return value;
            try
            {
                return InetAddress.getByName(value.toString());
            }
            catch (UnknownHostException e)
            {
                throw new InvocationTargetException(e);
            }
        }

        if ("InetAddrPort".equals(type) || "org.browsermob.proxy.jetty.util.InetAddrPort".equals(type))
        {
            if (value instanceof InetAddrPort) return value;
            try
            {
                return new InetAddrPort(value.toString());
            }
            catch (UnknownHostException e)
            {
                throw new InvocationTargetException(e);
            }
        }

        throw new IllegalStateException("Unknown type " + type);
    }
243969
public void parseRawValue(String value)
   {
      int valueIndex = 0;
      int elementIndex = 0;
      m_elements.clear();
      while (valueIndex < value.length() && elementIndex < m_elements.size())
      {
         int elementLength = m_lengths.get(elementIndex).intValue();
         if (elementIndex > 0)
         {
            m_elements.add(m_separators.get(elementIndex - 1));
         }
         int endIndex = valueIndex + elementLength;
         if (endIndex > value.length())
         {
            endIndex = value.length();
         }
         String element = value.substring(valueIndex, endIndex);
         m_elements.add(element);
         valueIndex += elementLength;
         elementIndex++;
      }
   }
298246
def p_value_paren(self, tree):
        ''' '''
        tree.value = convertstr(tree[1].value)
        tree.svalue = "(%s)"%str(tree[1].value)
1313069
def _parse_tree(self, node):
        
        if 'filename' in node.attrib:
            self.filename = node.attrib['filename']
        if 'type' in node.attrib:
            self.kind = node.attrib['type']
        if 'target' in node.attrib:
            self.target = node.attrib['target']
        self.value = node.text
75790
def nodes(self, value):
        
        # pylint: disable=attribute-defined-outside-init
        self._nodes = value
        self._index2node = {node.index: node for node in self._nodes}
1175568
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'dPr'
          node_child.xpath('*').each do |node_child_child|
            case node_child_child.name
            when 'begChr'
              @begin_character = ValuedChild.new(:string, parent: self).parse(node_child_child)
            when 'endChr'
              @end_character = ValuedChild.new(:string, parent: self).parse(node_child_child)
            end
          end
        end
      end
      @value = DocxFormula.new(parent: self).parse(node)
      self
    end
1214594
def _parse_entities(self):
        
        entities = list()

        for result in self._data:
            entity = dict()
            char_fragment = result.get('charFragment')
            start = char_fragment.get('start')
            end = char_fragment.get('end')
            entity['start'] = start
            entity['end'] = end
            entity['text'] = self._text[start: end+1]
            if sys.version < '3' and isinstance(entity['text'], str):
                entity['text'] = entity['test'].decode('utf-8')
            entity['isEntity'] = True
            for key, value in result.items():
                entity[key] = value
            entities.append(entity)
        self._entities = entities
1129868
def parse_value xpath
      node = parser_xml.xpath(xpath)
      return nil if node.empty?
      node.text.strip
    end
216965
def parse_input_value_def(lexer: Lexer) -> Node:
    """"""
    start = lexer.token
    description = parse_description(lexer)
    name = parse_name(lexer)
    expect_token(lexer, TokenKind.COLON)
    type_ = parse_type_reference(lexer)
    default_value = (
        parse_const_value(lexer)
        if expect_optional_token(lexer, TokenKind.EQUALS)
        else None
    )
    directives = parse_directives(lexer, True)
    return Node(
        description=description,
        name=name,
        type=type_,
        default_value=default_value,
        directives=directives,
        loc=loc(lexer, start),
    )
909324
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 's'
          @style_index = value.value.to_i
        when 't'
          @type = value.value.to_s
        end
      end
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'f'
          @formula = Formula.new(parent: self).parse(node_child)
        when 'v'
          @value = TextValue.new(parent: self).parse(node_child)
        end
      end
      parse_text_data
      self
    end
404237
def Parse(factory, file):
    

    entities = []

    while 1:
        # Just gets the whole struct nicely formatted
        data = GetNextStruct(file)

        if not data:
            break

        entities.extend(ProcessStruct(factory, data))

    return entities
1311459
def from_string(self, value):
        """"""
        # Remove optional []
        if value.startswith('[') and value.endswith(']'):
            text = value[1:-1].strip()
        else:
            text = value.strip()
        # Result is a list
        result = []
        # If value starts with '(' assume a list of pairs
        if text.startswith('('):
            tokens = text.split(',')
            if len(tokens) % 2 != 0:
                raise ValueError('not a valid list of pairs')
            pos = 0
            while (pos < len(tokens)):
                val1 = float(tokens[pos].strip()[1:].strip())
                val2 = float(tokens[pos + 1].strip()[:-1])
                result.append((val1, val2))
                pos += 2
        else:
            for val in text.split(','):
                result.append(float(val))
        # Ensure that the result contains at least two elements
        if len(result) < 2:
            raise ValueError('invalid number of elements in list: ' + str(len(result)))
        return result
154184
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'ref'
          @ref = Coordinates.parser_coordinates_range(value.value)
        end
      end

      node.xpath('*').each do |node_child|
        case node_child.name
        when 'filterColumn'
          @filter_column = FilterColumn.new(parent: self).parse(node_child)
        end
      end
      self
    end
48107
def simple_value(self, elt, ps, mixed=False):
        '''
        '''
        if not _valid_encoding(elt):
            raise EvaluateException('Invalid encoding', ps.Backtrace(elt))
        c = _children(elt)
        if mixed is False:
            if len(c) == 0:
                raise EvaluateException('Value missing', ps.Backtrace(elt))
            for c_elt in c:
                if c_elt.nodeType == _Node.ELEMENT_NODE:
                    raise EvaluateException('Sub-elements in value',
                        ps.Backtrace(c_elt))

        # It *seems* to be consensus that ignoring comments and
        # concatenating the text nodes is the right thing to do.
        return ''.join([E.nodeValue for E in c
                if E.nodeType 
                in [ _Node.TEXT_NODE, _Node.CDATA_SECTION_NODE ]])