private Map<String,String> parseData(String prawData) {
		// The parsing here is done largely "by hand" which means the code
		// gets a little tricky/messy.  The following conditions should
		// now be handled correctly:
		//   <?pi href="http://hi/a=b"?>        Reads OK
		//   <?pi href = 'http://hi/a=b' ?>     Reads OK
		//   <?pi href\t = \t'http://hi/a=b'?>  Reads OK
		//   <?pi href  =  "http://hi/a=b"?>    Reads OK
		//   <?pi?>                             Empty Map
		//   <?pi id=22?>                       Empty Map
		//   <?pi id='22?>                      Empty Map

		Map<String,String> data = new LinkedHashMap<String,String>();

		// System.out.println("rawData: " + rawData);

		// The inputData variable holds the part of rawData left to parse
		String inputData = prawData.trim();

		// Iterate through the remaining inputData string
		while (!inputData.trim().equals("")) {
			//System.out.println("parseData() looking at: " + inputData);

			// Search for "name =", "name=" or "name1 name2..."
			String name = "";
			String value = "";
			int startName = 0;
			char previousChar = inputData.charAt(startName);
			int pos = 1;
			for (; pos<inputData.length(); pos++) {
				char currentChar = inputData.charAt(pos);
				if (currentChar == '=') {
					name = inputData.substring(startName, pos).trim();
					// Get the boundaries on the quoted string
					// We use boundaries so we know where to start next
					int[] bounds = extractQuotedString(
							inputData.substring(pos+1));
					// A null value means a parse error and we return empty!
					if (bounds == null) {
						return Collections.emptyMap();
					}
					value = inputData.substring(bounds[0]+pos+1,
							bounds[1]+pos+1);
					pos += bounds[1] + 1;  // skip past value
					break;
				}
				else if (Character.isWhitespace(previousChar)
						&& !Character.isWhitespace(currentChar)) {
					startName = pos;
				}

				previousChar = currentChar;
			}

			// Remove the first pos characters; they have been processed
			inputData = inputData.substring(pos);

			// System.out.println("Extracted (name, value) pair: ("
			//                          + name + ", '" + value+"')");

			// If both a name and a value have been found, then add
			// them to the data Map - actually, we add an empty value if there
			// is a valid name.
			if (name.length() > 0) {
				//if (data.containsKey(name)) {
				// A repeat, that's a parse error, so return a null map
				//return new HashMap();
				//}
				//else {
				data.put(name, value);
				//}
			}
		}

		return data;
	}