Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

showing xml tags on the window

Status
Not open for further replies.

omerdurdu

Programmer
Jul 21, 2001
72
TR
Is there anyway to see the xml tags on the window as a output.
I have a page like this:
<metadata><br>
<idinfo><br>
<citation><br>
<citeinfo><br>
<origin>#q1.Originator_Names#</origin><br>
<pubdate>#q1.Publication_Date#</pubdate><br>
<title>#q1.Title#</title><br>
<edition>#q1.Edition#</edition><br>
<geoform>#q1.Presentation_Form#</geoform><br>
<lworkcit><br>
<citeinfo><br>
</metadata>

I would like to see the output on the window like
<origin>James</origin>
<pubdate>1998</pubdate>

Thanks for help
 
Code:
<CFSET xmlString='<metadata><br>
<idinfo><br>
<citation><br>
<citeinfo><br>
<origin>#q1.Originator_Names#</origin><br>
<pubdate>#q1.Publication_Date#</pubdate><br>
<title>#q1.Title#</title><br>
<edition>#q1.Edition#</edition><br>
<geoform>#q1.Presentation_Form#</geoform><br>
<lworkcit><br>
<citeinfo><br>
</metadata>'>..

<CFSET xmlString=Replace(xmlString,&quot;<&quot;,&quot;&lt;&quot;,&quot;ALL&quot;)>
<CFSET xmlString=Replace(xmlString,&quot;>&quot;,&quot;&gt;&quot;,&quot;ALL&quot;)>

<CFOUTPUT>#xmlString#</CFOUTPUT>
Did I help?
Vote!
 
Hi webmigit,
this didnt work. I am not sure but I tried different ways
but didnt work. But I have a question about downloading file.
I have a button, the user will click that button they will download a file from a directory but the user will choose his or her save location in the his hard drive. in windows2000 for txt file it is working but in XP it is not working that way. At the same time for xml extension it is not working in both operating system. It is not asking any save location, just a windwos coming up and showing data. Here is the code

form page:
-----------------------------
<CFFORM ACTION=&quot;cfdownloadxml.CFM&quot; METHOD=&quot;GET&quot; NAME=&quot;PICTURE&quot;>
<div align=&quot;center&quot;><input type=&quot;submit&quot; style=&quot;height:25;width:200;font:bold;font-size:10;color:black;background:parch.jpg&quot; name=&quot;action1&quot; value=&quot;Download FGDC XML File&quot;></div>
</CFFORM>


action page
--------------------------------------------
<cfheader name=&quot;content-disposition&quot; value=&quot;inline;filename=xml.xml&quot;>
<cfcontent type=&quot;application/unknown&quot; file=&quot;d:\Netscape\Server6\docs\dirn\nrid-ssl\metadata\uploadxml\xmlfile\xml.xml&quot; deletefile=&quot;Yes&quot;>

Thanks for you help
 
Never mind webmigit, I got that
it was attachment instead of inline

Can you help me on that xml tags output problem

Thanks
 
Dang tektips... Hang on... I wrote it right the first time but TT converted the charset code to normal html..

Code:
<CFSET xmlString='<metadata><br>
<idinfo><br>
<citation><br>
<citeinfo><br>
<origin>#q1.Originator_Names#</origin><br>
<pubdate>#q1.Publication_Date#</pubdate><br>
<title>#q1.Title#</title><br>
<edition>#q1.Edition#</edition><br>
<geoform>#q1.Presentation_Form#</geoform><br>
<lworkcit><br>
<citeinfo><br>
</metadata>'>..

<CFSET xmlString=Replace(xmlString,&quot;<&quot;,&quot;&amp;lt;&quot;,&quot;ALL&quot;)>
<CFSET xmlString=Replace(xmlString,&quot;>&quot;,&quot;&amp;gt;&quot;,&quot;ALL&quot;)>

<CFOUTPUT>#xmlString#</CFOUTPUT>
Did I help?
Vote!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top