Files
Testing/vidchat/style.aspx.cs
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

50 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Web;
using System.IO;
using System.Collections;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Xml;
namespace AVChat
{
public partial class Style : System.Web.UI.Page
{
protected void parseXml()
{
//Create the XmlDocument.
XmlDocument xmlDoc = new XmlDocument();
string fileName = Server.MapPath("themes/light/style.xml");
xmlDoc.Load(fileName);
if (File.Exists(fileName)){
xmlDoc.Load(fileName);
XmlNodeList nl = xmlDoc.SelectNodes("styles");
XmlNode root = nl[0];
foreach (XmlNode xnode in root.ChildNodes){
//List<string> values = new List<string>();
Response.Write("."+xnode.Name+"{\n");
foreach(XmlNode tag in xnode.ChildNodes){
Response.Write("\t"+tag.Name+":"+tag.InnerText+";\n");
}
Response.Write("}\n");
}
}
else
Response.Write("The file {0} could not be located"+fileName);
}
protected void Page_Load(object sender, EventArgs e){
parseXml();
}
}
}