Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
Qimon #1
Member since May 2008 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: read xml File lost for agsxmpp
ha,every one.I from china.I need Help.read xml File lost for agsxmpp.I need ensample.Thank you.
xml File:

<PersonalConfig>
    <Version>0.0.1.1</ Version>
    <HttpServerSet>                   
        <Server>202.96.134.133</ Server>                <
    </ HttpServerSet>
</PersonalConfig>

Code:
            //get file path
            serviceDoc.LoadFile(SystemConfigPath + SystemConfigName);          

            //
            serviceInfo = (Element)serviceDoc.RootElement;

            //get Version succeed.
            Messagebox.show(serviceInfo.GetTag("Version"))  //return 0.0.1.1

            //get Server  lost
            serviceInfo.GetTag("Server") != "0.0.1.1")     //return Null . I need Server value
This post was edited on 2008-05-22, 13:10 by Alex.
Avatar
Alex #2
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
<Server/> is not a children of <PersonalConfig/>
you have to get the <HttpServerSet/> Tag first or use

  1. GetTag("Server", true)

which also loops the grandchildren.

PS: please use better topics in your threads in the future

Alex
Avatar
Qimon #3
Member since May 2008 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: Thank you for help me.my  problem already resolve. again Thank for you.
Thank you for help me.my  problem already resolve. again Thank for you.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS