Hi, I've been stuck using this code:
put "<ResultInfo>
<ErrorNumber>0</ErrorNumber>
<Result>Success</Result>
<Message>The codes for your meeting have been emailed to John along with some instructions</Message>
</ResultInfo>" into tXMLData
put revCreateXMLTree(tXMLData, true, true) into tTreeID
put revXMLNodeContents(tTreeID, "ResultInfo/Message") into tMessage
answer tMessage
Does anyone know why it does not display the Message from the XML response and it always says, bad document id?
Thanks for the help!
Bad Document Id
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
richmond62
- Livecode Opensource Backer

- Posts: 10415
- Joined: Fri Feb 19, 2010 10:17 am
Re: Bad Document Id
Looks all a bit decontextualised really.
A bit more explanation might make things easier.
A bit more explanation might make things easier.
Re: Bad Document Id
My goal is to display the Result/Message using that XML.
But when I tried to run on it, it says bad document id.
But when I tried to run on it, it says bad document id.
-
richmond62
- Livecode Opensource Backer

- Posts: 10415
- Joined: Fri Feb 19, 2010 10:17 am
Re: Bad Document Id
Even just the use of "answer"
Re: Bad Document Id
Hi LXs98,
if you want to construct your xml from code inside the script try this:
or you could put your xml into a field
and then code:
Both methods work for me, the one with the field is a bit easier to build.
Kind regards
Bernd
if you want to construct your xml from code inside the script try this:
Code: Select all
on mouseUp
put "<ResultInfo>" & \
"<ErrorNumber>0</ErrorNumber>" & \
"<Result>Success</Result>" & \
"<Message>The codes for your meeting have been emailed to John along with some instructions</Message>" & \
"</ResultInfo>" into tXMLData
put revCreateXMLTree(tXMLData, true, true) into tTreeID
put revXMLNodeContents(tTreeID, "resultInfo/message") into tMessage
end mouseUp<ResultInfo>
<ErrorNumber>0</ErrorNumber>
<Result>Success</Result>
<Message>The codes for your meeting have been emailed to John along with some instructions</Message>
</ResultInfo>
and then code:
Code: Select all
on mouseUp
put field 1 into tXMLData
put revCreateXMLTree(tXMLData, true, true) into tTreeID
put revXMLNodeContents(tTreeID, "resultInfo/message") into tMessage
end mouseUpKind regards
Bernd
