Access the answers to your technology questions today.
Subscribe Now
30-day free trial. Register in 60 seconds.
What Makes Experts Exchange Unique?
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.
Try it out and discover for yourself.
Subscribe Now
30-day free trial. Register in 60 seconds.
Join the Community
Give a Little. Get a Lot.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Join the Community
by: eulacPosted on 2007-11-19 at 08:44:32ID: 20313535
use my template in parsing XML file. this is in c#.
Length > 0 ) ) (txtPath.P ostedFile. FileName); _" + fn;
SaveLocati on); );
tionCode") != null)
tionCode") != null)
private void Upload()
{
if( ( txtPath.PostedFile != null ) && ( txtPath.PostedFile.Content
{
imgProcessing.Visible = true;
string fn = System.IO.Path.GetFileName
string SaveLocation = "/RetailPlus/temp/uploaded
txtPath.PostedFile.SaveAs(
XmlTextReader reader = new XmlTextReader(SaveLocation
reader.WhitespaceHandling = WhitespaceHandling.None;
while (reader.Read())
{
switch (reader.NodeType)
{
case XmlNodeType.Element:
if (reader.Name == "Stock")
{
}
else if (reader.Name == "Item")
{
}
else if (reader.Name == "Variation" && reader.GetAttribute("Varia
{
}
else if (reader.Name == "VariationMatrix" && reader.GetAttribute("Varia
{
}
else
{
Label1.Text = "<b>Reader Name:<b>" + reader.Name + "<br>";
}
break;
case XmlNodeType.Text:
Label1.Text = "<b>" + reader.LocalName + ":<b>" + reader.Value + "<br>";
break;
}
}
reader.Close();
}
else
{
Response.Write("Please select a file to upload.");
}
}