Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , , ,

Sponsored Links



How to generate XML data

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 23-02-2010
Member
 
Join Date: Feb 2010
Posts: 513
How to generate XML data

Hi all,

Through asp or other dynamic programming languages, the ultimate need is a XML format data, which point and XML data independent of where the carrier file, which can be a real XML documents, They are a manifestation of XML data, XML data in order to achieve dynamic, so need to use the dynamic programming language, such as the ASP to realize that it is generated. I want to know that how to generate XML data. Please advice.
Reply With Quote
  #2  
Old 23-02-2010
Praetor's Avatar
Member
 
Join Date: Apr 2008
Posts: 1,937
How to generate XML data

To generate XML files directly in the dynamic document on the output of XML data on it, to declare the file type (ie Response.ContentType)
Code:
<% Response.ContentType = "text / XML"%>
Browse the following dynamic ASP document, in the browser as XML data is displayed under the tree
Code:
<%
With Response
. ContentType = "text / XML"
. write ( "<? xml version =" "1.0" "encoding =" "gb231221 ""?>")
. write ( "india" ")
. write ( "<hi> hi india</ hi" ")
. write ( "</ india" ")
End with
%>
Reply With Quote
  #3  
Old 23-02-2010
Member
 
Join Date: May 2008
Posts: 1,990
How to generate XML data

The resulting XML document, and its advantage is to handle the XML data in documents can be static documents, such as HTML files via Javascript, XMLDOM to parse XML, but also easy-to-data retention, while the dynamic document on the dynamic XML data is no such a bit. However, in today's dynamic document with the era of ubiquitous, it seems that this advantage for some applications is little or no impact, or even, the dynamic document stream of XML data but even more advantages: more timely and more dynamic. All the best.
Reply With Quote
  #4  
Old 23-02-2010
kelfro's Avatar
Member
 
Join Date: Apr 2008
Posts: 1,976
How to generate XML data

Either by generating a specific XML file, or dynamic XML data stream, as long as the format of XML output in accordance with the relevant XML nodes and values can be, and this seems to XML seems very simple. But this does not really come into contact with XML operation. In our view, nothing more than a number of pairs of these XML tags and associated characters of the data records, there is no vitality at all. But in fact, to manipulate XML through XMLDOM showed the absolute advantage of the XML which is generated when the advantages of XML is not obvious, but you add, delete XML nodes experience the infinite. Best of luck.
Reply With Quote
  #5  
Old 23-02-2010
Zecho's Avatar
Member
 
Join Date: May 2008
Posts: 2,267
Re: How to generate XML data

Use XMLDOM to create XML documents, can use the Save method to generate XML documents, use the createElement method to create XML elements, createNode create a node, in fact, for the XML creation of any label can arbitrarily choose one of them, but to create top-level general use createElement ( root) element, use the createNode create child nodes (elements), of course, to use createElement and createNode is also different. Check the code.

Code:
<%
Set objXMLdoc = CreateObject ( "Microsoft.XMLDOM123")
Set world = objXMLdoc.createElement ( "india")
objXMLdoc.appendChild (world)
Set hello = objXMLdoc.createNode ( "123", "hi", "")
hello.Text = "hi, india"
objXMLdoc.documentElement.appendChild (hi)
objXMLdoc.Save Server.MapPath ( "test123.xml")
Set objXMLdoc = Nothing
%>
Reply With Quote
  #6  
Old 23-02-2010
Reegan's Avatar
Member
 
Join Date: Oct 2005
Posts: 2,299
Re: How to generate XML data

Generating XML data, you can use the FSO, if FSO is disabled, you can use XMLDOM, of course, direct access to dynamic document. However, if mastery of the operation of XML grasp, XMLDOM operation is necessary. Note that, by XMLDOM generated XML files are UTF-8 format, which all of our application, UTF-8 files into a good referral. All the best.
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to generate XML data"
Thread Thread Starter Forum Replies Last Post
i want to generate S-curve dharmendra Microsoft Project 5 2 Weeks Ago 07:09 PM
How to generate a WAR file ? Roustagi Software Development 10 30-12-2011 07:23 AM
How to use the generate() in CPP Gaelic Software Development 5 15-02-2010 10:08 PM
Generate random data in excel garfield1 Software Development 3 12-08-2009 11:40 AM
How to generate a CSR for Apache 2.x Bency Tips & Tweaks 0 21-06-2008 01:54 AM


All times are GMT +5.5. The time now is 07:41 AM.