BestTechie Forums: Help With Xml - BestTechie Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Help With Xml is there a way to make xml NOT show up as just colord script?


#1 User is offline   GOspitONpuppies 

  • Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 06-April 08

Posted 06 April 2008 - 11:53 AM

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?

#2 User is offline   jcl 

  • UberTechie
  • Group: Linux Experts
  • Posts: 1304
  • Joined: 30-August 04
  • Location:The Internet
  • Operating System:Arch

Posted 06 April 2008 - 09:41 PM

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.

#3 User is offline   iccaros 

  • UberTechie
  • Group: Linux Experts
  • Posts: 1292
  • Joined: 31-August 04
  • Location:Great State of Washingtion
  • Operating System:Gentoo,Iccaros-Linux(of course),Slackware,GentooX,Red Hat, Windows (3.1 to VISTA BETA), MAC OSX (10.4 currently),LFS, Solaris 8,9,10, Trusted Solaris, FreeBSD, OPENBSD, NETBSD

Posted 08 April 2008 - 10:39 AM

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?

#4 User is offline   jcl 

  • UberTechie
  • Group: Linux Experts
  • Posts: 1304
  • Joined: 30-August 04
  • Location:The Internet
  • Operating System:Arch

Posted 08 April 2008 - 04:48 PM

View Posticcaros, on Apr 8 2008, 08:39 AM, said:

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.

#5 User is offline   sahin 

  • Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 20-June 08

Posted 20 June 2008 - 02:50 AM

View Postjcl, on Apr 8 2008, 04:48 PM, said:

View Posticcaros, on Apr 8 2008, 08:39 AM, said:

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>

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users