Specifications

Aastra July 2014 PA-001011-03-04
238
8.5 Parsing error debug example
In this example, the phone is making an XML GET and receives the following XML object as an
answer. The answer has an obvious parsing error, the phone displays ‘Cannot display’.
<?xml version="1.0" encoding="ISO-8859-1"?>
<AastraIPPhoneTextMenu>
<Title>Graphic Apps Demo</Title>
<MenuItem>
<Prompt>Clock Digital GMT+1</Prompt>
<URI>http://192.168.0.112/xml/lucaGD/demo.php?type=dclock</URI>
</MenuItem>
<MenuItem>
<Prompt>Clock Analog GMT+1</Prompt>
<URI>http://192.168.0.112/xml/lucaGD/demo.php?type=aclock</URI>
</MenuItem>
<MenuItem>
<Prompt>Different Fonts</Prompt>
<URI>http://192.168.0.112/xml/lucaGD/demo.php?type=font</URI>
</MenuItem>
<AastraIPPhoneTextMenu>
The error is on the last line, it should be </AastraIPPhoneTextMenu>.
The following Syslog traces tell us where the problem is.
CreateApp: (UI) INFO: XML=|<?xml version="1.0" encoding="ISO-8859-
1"?><010><AastraIPPhoneTextMenu><010><Title>Graphic Apps
Demo</Title><010><MenuItem><010><Prompt>Clock Digital
GMT+1</Prompt><010><URI>http://192.168.0.112/xml/lucaGD/demo.php?type=dclock</URI><
010></MenuItem><010><MenuItem><010><Prompt>Clock Analog
GMT+1</Prompt><010><URI>http://192.168.0.112/xml/lucaGD/demo.php?type=aclock</URI><
010></MenuItem><010><MenuItem><010><Prompt>Different
Fonts</Prompt><010><URI>http://192.168.0.112/xml/lucaGD/demo.php?type=font</URI><01
0></MenuItem><010><AastraIPPhoneTextMenu><010>|<010>mac:00-08-5D-1A-3C-54
ParserData: (XML) FUNC: ParserData ctor<010>mac:00-08-5D-1A-3C-54
TextMenuData: (XML) FUNC: TextMenuData ctor<010>mac:00-08-5D-1A-3C-54
startTagHandler: (XML) ERROR: Invalid tag: <AastraIPPhoneTextMenu> in the Root
state<010>mac:00-08-5D-1A-3C-54
TextMenuData: (XML) FUNC: TextMenuData dtor<010>mac:00-08-5D-1A-3C-54
ParserData: (XML) FUNC: ParserData dtor<010>mac:00-08-5D-1A-3C-54
CreateApp: (UI) ERROR: !!!!!!!!!!!!!!!!!!!! XML parsing error: no element found,
Line 16, Column 23 !!!!!!!!!!!!!!!!!!!!<010>mac:00-08-5D-1A-3C-54
ParserData: (XML) FUNC: ParserData ctor<010>mac:00-08-5D-1A-3C-54