0

/t5/coldfusion-discussions/http-response/td-p/608465
Mar 14, 2007
Mar 14, 2007
Copy link to clipboard
Copied
So . . . I post a https successfully. I get an OK and ticket
id in return. How do I get the second returned node? I know how to
parse the xml, but I don't know how to set a variable for each
returned value. Please help.
<cfset myXMLdoc = XMLParse(cfhttp.filecontent)>
I'm making this up to give an example of what I hope to do:
<cfset approval = cfhttp.status> ??
<cfset ticketid = cfhttp.ticketid> ??
<cfset myXMLdoc = XMLParse(cfhttp.filecontent)>
I'm making this up to give an example of what I hope to do:
<cfset approval = cfhttp.status> ??
<cfset ticketid = cfhttp.ticketid> ??
TOPICS
Getting started
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Mar 15, 2007
Mar 15, 2007
The output turned out to be so simple. It's amazing how long
I had to search for this answer. I hope this helps someone else:
<cfset MyDoc = XMLParse(CFHTTP.FileContent)>
<cfset response = MyDoc.xmlRoot.XmlChildren[2]>
<cfoutput>#variables.response#</cfoutput>
<cfset MyDoc = XMLParse(CFHTTP.FileContent)>
<cfset response = MyDoc.xmlRoot.XmlChildren[2]>
<cfoutput>#variables.response#</cfoutput>
Engaged
,
/t5/coldfusion-discussions/http-response/m-p/608466#M56737
Mar 14, 2007
Mar 14, 2007
Copy link to clipboard
Copied
Convert the http response body to a query object
See http://livedocs.adobe.com/coldfusion/7/htmldocs/00000272.htm
and
http://livedocs.adobe.com/coldfusion/7/htmldocs/00001610.htm
See http://livedocs.adobe.com/coldfusion/7/htmldocs/00000272.htm
and
http://livedocs.adobe.com/coldfusion/7/htmldocs/00001610.htm
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

Guest
AUTHOR
/t5/coldfusion-discussions/http-response/m-p/608467#M56738
Mar 14, 2007
Mar 14, 2007
Copy link to clipboard
Copied
Is it possible to set column names within cfhttp if the
method="post"? The column names being the nodes in the response
string.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

Guest
AUTHOR
/t5/coldfusion-discussions/http-response/m-p/608468#M56739
Mar 15, 2007
Mar 15, 2007
Copy link to clipboard
Copied
I tried both of these examples. I received errors. I don't
think I understand. In the example they gave, would "author" in
#item.author.xmltext# be the name of the returned DOM?
<strong>Author</strong> #item.author.xmltext#<br>
<strong>Author</strong> #item.author.xmltext#<br>
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

/t5/coldfusion-discussions/http-response/m-p/608469#M56740
Mar 15, 2007
Mar 15, 2007
Copy link to clipboard
Copied
The output turned out to be so simple. It's amazing how long
I had to search for this answer. I hope this helps someone else:
<cfset MyDoc = XMLParse(CFHTTP.FileContent)>
<cfset response = MyDoc.xmlRoot.XmlChildren[2]>
<cfoutput>#variables.response#</cfoutput>
<cfset MyDoc = XMLParse(CFHTTP.FileContent)>
<cfset response = MyDoc.xmlRoot.XmlChildren[2]>
<cfoutput>#variables.response#</cfoutput>
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/coldfusion-discussions/http-response/m-p/608470#M56741
Mar 15, 2007
Mar 15, 2007
Copy link to clipboard
Copied
<cfset MyDoc = XMLParse(CFHTTP.FileContent)>
<cfset response = MyDoc.xmlRoot.XmlChildren[2]>
<cfoutput>#variables.response#</cfoutput>
I suspect that wouldn't work. These would
<cfset response = MyDoc.xmlRoot.XmlChildren[2].XmlName>
<cfset response = MyDoc.xmlRoot.XmlChildren[2].XmlText>
<cfset response = MyDoc.xmlRoot.XmlChildren[2]>
<cfoutput>#variables.response#</cfoutput>
I suspect that wouldn't work. These would
<cfset response = MyDoc.xmlRoot.XmlChildren[2].XmlName>
<cfset response = MyDoc.xmlRoot.XmlChildren[2].XmlText>
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

Guest
AUTHOR
/t5/coldfusion-discussions/http-response/m-p/608471#M56742
Mar 16, 2007
Mar 16, 2007
Copy link to clipboard
Copied
It did work, so I thought. It gave me the output value which
"appeared" to be correct. It evidently was still outputting in the
wrong format? I'm not sure I understand why it looked like the
right output, but it actually wasn't. Is that due to the format it
was in?
Your additional information finished what I needed. Thank you!
Your additional information finished what I needed. Thank you!
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

