Help With Xml


Recommended Posts

Faster in what sense?

Anyway, XML has no predefined presentation -- or much of anything else, for that matter -- so you need to provide style sheets if you want the document to be presentable, so to speak.

Link to post
Share on other sites

plus even with CSS do you not need something to read the xml file? like PHP, JAVA ect?

I use Ruby it seams fast, and it uses zero xml

also how do you get faster then strait HTML?

Link to post
Share on other sites
plus even with CSS do you not need something to read the xml file? like PHP, JAVA ect?

All of the major browsers understand XML. Better than HTML, in some cases.

Link to post
Share on other sites
  • 2 months later...
plus even with CSS do you not need something to read the xml file? like PHP, JAVA ect?

All of the major browsers understand XML. Better than HTML, in some cases.

C# CODE

using System;

using System.Data;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

using System.IO;

using System.Text;

using System.Xml;

public partial class XmlOlustur : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

DataView XmlSag = personel_kontrol.Toplam_kayitlar("select * from User_Haber where HResim_Yer='2' and Haber_Durum='Evet'");

XmlTextWriter writer = new XmlTextWriter(Server.MapPath("bigsale1.xml"), System.Text.Encoding.UTF8);

writer.WriteStartDocument();

writer.WriteComment("The Program ");

writer.Formatting = Formatting.Indented;

writer.WriteStartElement("bigSale");

for (int FlasId = 0; FlasId < XmlSag.Count; FlasId++)

{

//writer.WriteElementString("image", null);

//writer.WriteAttributeString("picUrl", "Haber/" + XmlSag[FlasId]["DilID"].ToString() + "/Resimler/" + XmlSag[FlasId]["Haber_Resim"].ToString());

//writer.WriteAttributeString("linkUrl", "Yonlendir.aspx?ID=" + XmlSag[FlasId]["DilID"].ToString());

//writer.WriteAttributeString("title", XmlSag[FlasId]["Haber_Tarih"].ToString());

writer.WriteStartElement("image", null);

writer.WriteAttributeString("picUrl", "Haber/" + XmlSag[FlasId]["DilID"].ToString() + "/Resimler/" + XmlSag[FlasId]["Haber_Resim"].ToString());

writer.WriteAttributeString("linkUrl", "Yonlendir.aspx?ID=" + XmlSag[FlasId]["DilID"].ToString());

writer.WriteAttributeString("title", XmlSag[FlasId]["Haber_Tarih"].ToString());

writer.WriteEndElement();

}

writer.Flush();

writer.Close();

}

}

XML SAMPLE

<?xml version="1.0" encoding="utf-8"?><!--The Program -->

<bigSale>

<image picUrl="Haber/Tr/Resimler/img3.jpg" linkUrl="Yonlendir.aspx?ID=Tr" title="17.06.2008" />

<image picUrl="Haber/Tr/Resimler/img2.jpg" linkUrl="Yonlendir.aspx?ID=Tr" title="17.06.2008" />

</bigSale>

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...