T
TheReckter
I am fairly new to ASP and wanted to output certain parts of an xml
file directly to the page, I tried the following method however it did
not work, any help in correcting this issue would be greatly
appreciated
AppSettings As = new AppSettings();
XmlTextReader reader = new XmlTextReader(As.Loca + "./pages/" +
PageID.ToString() + "/page.xml");
XhtmlTextWriter writer = new XhtmlTextWriter(TextWriter.Null);
while (reader.Read())
{
if (reader.Name == "Name")
{
string x = reader.ReadString();
writer.WriteLine(reader.ReadString());
}
}
writer.Close();
this in my mind would print the page's name to the page, however it
does not work correctly, when debugging at
writer.WriteLine(reader.ReadString()); I can tell all variavles hold
the correct values therefore that is not an issue. Thankyou for your
help.
file directly to the page, I tried the following method however it did
not work, any help in correcting this issue would be greatly
appreciated
AppSettings As = new AppSettings();
XmlTextReader reader = new XmlTextReader(As.Loca + "./pages/" +
PageID.ToString() + "/page.xml");
XhtmlTextWriter writer = new XhtmlTextWriter(TextWriter.Null);
while (reader.Read())
{
if (reader.Name == "Name")
{
string x = reader.ReadString();
writer.WriteLine(reader.ReadString());
}
}
writer.Close();
this in my mind would print the page's name to the page, however it
does not work correctly, when debugging at
writer.WriteLine(reader.ReadString()); I can tell all variavles hold
the correct values therefore that is not an issue. Thankyou for your
help.