Index: /pjproject/branches/pjproject-0.5-stable/pjlib-util/include/pjlib-util/scanner.h
===================================================================
--- /pjproject/branches/pjproject-0.5-stable/pjlib-util/include/pjlib-util/scanner.h	(revision 1141)
+++ /pjproject/branches/pjproject-0.5-stable/pjlib-util/include/pjlib-util/scanner.h	(revision 1142)
@@ -351,4 +351,27 @@
 
 /** 
+ * Get characters between quotes. If current input doesn't match begin_quote,
+ * syntax error will be thrown. Note that the resulting string will contain
+ * the enclosing quote.
+ *
+ * @param scanner	The scanner.
+ * @param begin_quotes  The character array to begin the quotes. For example,
+ *                      the two characters " and '.
+ * @param end_quotes    The character array to end the quotes. The position
+ *                      found in the begin_quotes array will be used to match
+ *                      the end quotes. So if the begin_quotes was the array
+ *                      of "'< the end_quotes should be "'>. If begin_array
+ *                      matched the ' then the end_quotes will look for ' to
+ *                      match at the end.
+ * @param qsize         The size of the begin_quotes and end_quotes arrays.
+ * @param out           String to store the result.
+ */
+PJ_DECL(void) pj_scan_get_quotes(pj_scanner *scanner,
+                                 const char *begin_quotes,
+                                 const char *end_quotes, int qsize,
+                                 pj_str_t *out);
+
+
+/**
  * Get N characters from the scanner.
  *
Index: /pjproject/branches/pjproject-0.5-stable/pjlib-util/src/pjlib-util/scanner.c
===================================================================
--- /pjproject/branches/pjproject-0.5-stable/pjlib-util/src/pjlib-util/scanner.c	(revision 1141)
+++ /pjproject/branches/pjproject-0.5-stable/pjlib-util/src/pjlib-util/scanner.c	(revision 1142)
@@ -340,11 +340,28 @@
 
 PJ_DEF(void) pj_scan_get_quote( pj_scanner *scanner,
-				 int begin_quote, int end_quote, 
-				 pj_str_t *out)
-{
-    register char *s = scanner->curptr;
-    
+				int begin_quote, int end_quote, 
+				pj_str_t *out)
+{
+    pj_scan_get_quotes(scanner, (char*)&begin_quote, (char*)&end_quote, 1, out);
+}
+
+PJ_DEF(void) pj_scan_get_quotes(pj_scanner *scanner,
+                                const char *begin_quote, const char *end_quote,
+                                int qsize, pj_str_t *out)
+{
+    register char *s = scanner->curptr;
+    int qpair = -1;
+    int i;
+
+    pj_assert(qsize > 0);
+
     /* Check and eat the begin_quote. */
-    if (*s != begin_quote) {
+    for (i = 0; i < qsize; ++i) {
+	if (*s == begin_quote[i]) {
+	    qpair = i;
+	    break;
+	}
+    }
+    if (qpair == -1) {
 	pj_scan_syntax_err(scanner);
 	return;
@@ -356,10 +373,10 @@
     do {
 	/* loop until end_quote is found. */
-	while (*s && *s != '\n' && *s != end_quote) {
+	while (*s && *s != '\n' && *s != end_quote[qpair]) {
 	    ++s;
 	}
 
 	/* check that no backslash character precedes the end_quote. */
-	if (*s == end_quote) {
+	if (*s == end_quote[qpair]) {
 	    if (*(s-1) == '\\') {
 		if (s-2 == scanner->begin) {
@@ -390,5 +407,5 @@
 
     /* Check and eat the end quote. */
-    if (*s != end_quote) {
+    if (*s != end_quote[qpair]) {
 	pj_scan_syntax_err(scanner);
 	return;
@@ -404,4 +421,5 @@
     }
 }
+
 
 PJ_DEF(void) pj_scan_get_n( pj_scanner *scanner,
Index: /pjproject/branches/pjproject-0.5-stable/pjlib-util/src/pjlib-util/xml.c
===================================================================
--- /pjproject/branches/pjproject-0.5-stable/pjlib-util/src/pjlib-util/xml.c	(revision 1141)
+++ /pjproject/branches/pjproject-0.5-stable/pjlib-util/src/pjlib-util/xml.c	(revision 1142)
@@ -109,5 +109,5 @@
 	if (*scanner->curptr == '=') {
 	    pj_scan_get_char( scanner );
-	    pj_scan_get_quote(scanner, '"', '"', &attr->value);
+            pj_scan_get_quotes(scanner, "\"'", "\"'", 2, &attr->value);
 	    /* remove quote characters */
 	    ++attr->value.ptr;
