Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
XML white space parsing problem
17-03-2014, 02:49 PM
Post: #1
XML white space parsing problem
The control point stack's parsing of action responses doesn't handle XML white space correctly. If a device sends a response envelope containing tokens that aren't separated by a space character but are separated by other white space characters such as CR, LF and TAB, the code in XmlParserBasic::NextTag (line 132) doesn't find the tag name because it is calling

aName.Set(parser.Next(' '));

and there isn't a ' ' character there.

I couldn't see any way to fix this using the existing methods in Parser.cpp, so I have added a new method Parser::NextWhiteSpace that splits the parse string at any white space character. A patch is attached.


Attached File(s)
.zip  parser.zip (Size: 1.33 KB / Downloads: 1)
Find all posts by this user
17-03-2014, 03:03 PM
Post: #2
RE: XML white space parsing problem
Thanks, I've committed your patch to our internal repo; it should be on github later.

Out of interest, which device(s) send action responses that require this change?
Find all posts by this user
17-03-2014, 03:17 PM
Post: #3
RE: XML white space parsing problem
(17-03-2014 03:03 PM)simonc Wrote:  Thanks, I've committed your patch to our internal repo; it should be on github later.

Thanks very much!

Quote:Out of interest, which device(s) send action responses that require this change?

It's the Chord CodeX renderer:

<s:Envelope{cr}{lf}{tab}{tab}xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"......
Find all posts by this user


Forum Jump: