Results 1 to 6 of 6

Thread: How to generate XML data

  1. #1
    Join Date
    Feb 2010
    Posts
    537

    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.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    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
    %>

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    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.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    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.

  5. #5
    Join Date
    May 2008
    Posts
    2,297

    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
    %>

  6. #6
    Join Date
    Oct 2005
    Posts
    2,393

    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.

Similar Threads

  1. i want to generate S-curve
    By MR. Mohr in forum Microsoft Project
    Replies: 5
    Last Post: 24-01-2012, 07:09 PM
  2. Can we generate exe file in php?
    By amitweb007 in forum Software Development
    Replies: 1
    Last Post: 26-09-2011, 11:38 AM
  3. How to generate content with CSS
    By Eshita The Techie in forum Software Development
    Replies: 5
    Last Post: 08-01-2011, 11:54 AM
  4. How to use the generate() in CPP
    By Gaelic in forum Software Development
    Replies: 5
    Last Post: 15-02-2010, 10:08 PM
  5. Generate random data in excel
    By garfield1 in forum Software Development
    Replies: 3
    Last Post: 12-08-2009, 10:40 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,621,447.58334 seconds with 17 queries