File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
app/src/main/java/com/imgtec/hobbyist/flow Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -93,19 +93,36 @@ public void setNodesFromXml(String xml) {
9393 xpp = factory .newPullParser ();
9494 xpp .setInput (new StringReader (xml ));
9595 int eventType = xpp .getEventType ();
96+
9697 while (eventType != XmlPullParser .END_DOCUMENT ) {
9798 if (eventType == XmlPullParser .START_TAG ) {
9899 final MessageType messageType = MessageType .retrieveMessageTypeFromXmlTag (xpp .getName ());
100+ int start = xpp .getColumnNumber ();
99101 if (messageType != null && !messageType .equals (MessageType .EMPTY )) {
100102 setType (messageType );
103+ } else if (xpp .getName ().equals ("responseparams" )){
104+ eventType = xpp .next ();
105+
106+ int end = start ;
107+ while (true ){
108+ if (eventType == XmlPullParser .END_TAG && xpp .getName ().equals ("responseparams" )){
109+ break ;
110+ }
111+ end = xpp .getColumnNumber ();
112+ eventType = xpp .next ();
113+ }
114+
115+ addNode ("responseparams" , xml .substring (start -1 , end -1 ));
101116 } else {
102117 addNode (xpp .getName (), xpp .nextText ());
103118 }
104119 }
120+
105121 eventType = xpp .next ();
106122 }
107123 } catch (XmlPullParserException | IOException e ) {
108124 DebugLogger .log (getClass ().getSimpleName (), "parsing xml failed" );
125+ e .printStackTrace ();
109126 }
110127 }
111128
You can’t perform that action at this time.
0 commit comments