Sponsored By

Sign in to follow this  
Caleb

Help With Xml

Recommended Posts

I am making a site out of xml because its faster than java script and HTML but it wont show up, it just has the script i wrote in colors.

could some one please help?

Share this post


Link to post
Share on other sites

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.

Share this post


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?

Share this post


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.

Share this post


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.

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>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this