Click here to Skip to main content
15,922,533 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: how to recognize webserver exactly Pin
gauthee18-Apr-07 22:37
gauthee18-Apr-07 22:37 
AnswerRe: how to recognize webserver exactly Pin
Sathesh Sakthivel18-Apr-07 21:26
Sathesh Sakthivel18-Apr-07 21:26 
GeneralRe: how to recognize webserver exactly Pin
N a v a n e e t h18-Apr-07 21:29
N a v a n e e t h18-Apr-07 21:29 
GeneralRe: how to recognize webserver exactly Pin
J4amieC18-Apr-07 22:30
J4amieC18-Apr-07 22:30 
AnswerRe: how to recognize webserver exactly Pin
N a v a n e e t h18-Apr-07 21:28
N a v a n e e t h18-Apr-07 21:28 
Questionread xml file Pin
Imran Khan Pathan18-Apr-07 20:51
Imran Khan Pathan18-Apr-07 20:51 
AnswerRe: read xml file Pin
gauthee18-Apr-07 21:10
gauthee18-Apr-07 21:10 
AnswerRe: read xml file Pin
Sandeep Akhare18-Apr-07 22:23
Sandeep Akhare18-Apr-07 22:23 
HI
What is the size of the xml file if it is not very large then use XmlDocument object to read the xml file .
If file is large and you don't want to update it i.e only have to retrive the data and performance is an issue then use XmlReader to read the file as
you can use this code as reference for it
void ParseURL(string strUrl)<br />
{<br />
    try<br />
    {<br />
        XmlTextReader reader = new XmlTextReader(strUrl);<br />
        while (reader.Read())<br />
        {<br />
            switch (reader.NodeType)<br />
            {<br />
            case XmlNodeType.Element:<br />
                Hashtable attributes = new Hashtable();<br />
                string strURI= reader.NamespaceURI;<br />
                string strName= reader.Name;<br />
                if (reader.HasAttributes)<br />
                {<br />
                    for (int i = 0; i < reader.AttributeCount; i++)<br />
                    {<br />
                        reader.MoveToAttribute(i);<br />
                        attributes.Add(reader.Name,reader.Value);<br />
                    }<br />
                }<br />
                StartElement(strURI,strName,strName,attributes);<br />
            break;<br />
             //<br />
             //you can handle other cases here<br />
             //<br />
 <br />
             //case XmlNodeType.EndElement:<br />
             // Todo<br />
             //case XmlNodeType.Text:<br />
             // Todo<br />
            default:<br />
            break;<br />
        }<br />
    }<br />
    catch (XmlException e)<br />
    {<br />
        Console.WriteLine("error occured: " + e.Message);<br />
    }<br />
}<br />


Thanks and Regards
Sandeep

If you want something you never had,
do something you have never done!


QuestionDataSet to HTML??? Pin
PACO7718-Apr-07 20:49
PACO7718-Apr-07 20:49 
AnswerRe: DataSet to HTML??? Pin
Paddy Boyd18-Apr-07 23:43
Paddy Boyd18-Apr-07 23:43 
GeneralRe: DataSet to HTML??? Pin
PACO7719-Apr-07 0:28
PACO7719-Apr-07 0:28 
Questionextending GridView control Pin
248912818-Apr-07 20:32
248912818-Apr-07 20:32 
AnswerRe: extending GridView control Pin
N a v a n e e t h18-Apr-07 21:31
N a v a n e e t h18-Apr-07 21:31 
QuestionCaching Pin
NICE TO MEET18-Apr-07 20:07
NICE TO MEET18-Apr-07 20:07 
AnswerRe: Caching Pin
Sathesh Sakthivel18-Apr-07 20:56
Sathesh Sakthivel18-Apr-07 20:56 
AnswerRe: Caching Pin
Atif Ali Bhatti18-Apr-07 22:40
Atif Ali Bhatti18-Apr-07 22:40 
AnswerRe: Caching Pin
RichardGrimmer20-Apr-07 5:18
RichardGrimmer20-Apr-07 5:18 
QuestionCache Pin
NICE TO MEET18-Apr-07 20:05
NICE TO MEET18-Apr-07 20:05 
AnswerRe: Cache Pin
Sathesh Sakthivel18-Apr-07 21:00
Sathesh Sakthivel18-Apr-07 21:00 
QuestionFrameset problem its very urgent........ [modified] Pin
Member 387988118-Apr-07 18:13
Member 387988118-Apr-07 18:13 
AnswerRe: Frameset problem its very urgent........ Pin
Venk25919-Apr-07 3:42
Venk25919-Apr-07 3:42 
QuestionASP.Net Message Box Pin
J Liang18-Apr-07 18:10
J Liang18-Apr-07 18:10 
AnswerRe: ASP.Net Message Box Pin
Shajeel18-Apr-07 19:16
Shajeel18-Apr-07 19:16 
GeneralRe: ASP.Net Message Box Pin
J Liang18-Apr-07 21:16
J Liang18-Apr-07 21:16 
GeneralRe: ASP.Net Message Box Pin
Shajeel18-Apr-07 21:23
Shajeel18-Apr-07 21:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.