Click here to Skip to main content
14,669,325 members
Home » Discussions » XML / XSL
   

XML / XSL

 
AnswerRe: How ti create sitemap in xml? Pin
User 171649225-Apr-10 1:11
professionalUser 171649225-Apr-10 1:11 
GeneralRe: How ti create sitemap in xml? Pin
JMecier27-Apr-10 3:57
MemberJMecier27-Apr-10 3:57 
QuestionWord Formatting Pin
Mahesh Kulkarni14-Apr-10 0:09
MemberMahesh Kulkarni14-Apr-10 0:09 
Questionbuilding an XML page Pin
Farraj13-Apr-10 5:26
MemberFarraj13-Apr-10 5:26 
AnswerRe: building an XML page Pin
Estys14-Apr-10 1:01
MemberEstys14-Apr-10 1:01 
GeneralRe: building an XML page Pin
Farraj14-Apr-10 1:20
MemberFarraj14-Apr-10 1:20 
GeneralRe: building an XML page Pin
Estys14-Apr-10 2:22
MemberEstys14-Apr-10 2:22 
GeneralRe: building an XML page Pin
Farraj14-Apr-10 6:07
MemberFarraj14-Apr-10 6:07 
Hi Estys,
First of all thank you a lot for your help and time, i really appreciate that.
Second, i think im gonna take option #1Smile | :) lol.
Anyway, this is the code i've made for now, im not sure about it but i'd really appreciate more help.

 protected void Button1_Click(object sender, EventArgs e)
    {
       XmlDocument XDoc = new XmlDocument();
        FileInfo fi1 = new System.IO.FileInfo("chores2.xml");
        if (!fi1.Exists)
        {

            XDoc.Load("chores2.xml");
        }

        else
        {
            
           
            XmlNode root = XDoc.DocumentElement;
            XDoc.SelectSingleNode("descendant::day[@title='"+this.dropdwnlst.selectedvalue+"']");

            XmlElement Xjob = XDoc.CreateElement("job");
            Xjob.SetAttribute("a", "" + this.txtBoxProduct.Text + "");
            Xjob.SetAttribute("b", "" + this.txtBoxSize.Text + "");
            Xjob.SetAttribute("c", "" + this.txtBoxPrice.Text + "");
            Xjob.SetAttribute("d", "" + this.txtBoxAmount.Text + "")
            XDoc.Save("chores2.xml");
        }
}

this is what im thinking about, i have 4 text boxes for the job attributes. with another DropDownList that through it i can choose what kind of a "DAY" according to the title i want to play with and add "jobs".

So, this cute line
XDoc.SelectSingleNode("descendant::day[@title='"+this.dropdwnlst.selectedvalue+"']");

is really great, but how i can control my selected node and enter the correct attributes
Xjob.SetAttribute("a", "" + this.txtBoxProduct.Text + "");
          Xjob.SetAttribute("b", "" + this.txtBoxSize.Text + "");
          Xjob.SetAttribute("c", "" + this.txtBoxPrice.Text + "");
          Xjob.SetAttribute("d", "" + this.txtBoxAmount.Text + "")

to it?




Thanks again for your help.
GeneralRe: building an XML page Pin
Estys14-Apr-10 22:52
MemberEstys14-Apr-10 22:52 
GeneralRe: building an XML page Pin
Farraj15-Apr-10 0:46
MemberFarraj15-Apr-10 0:46 
AnswerRe: building an XML page Pin
Farraj16-Apr-10 4:26
MemberFarraj16-Apr-10 4:26 
GeneralRe: building an XML page Pin
Estys16-Apr-10 6:04
MemberEstys16-Apr-10 6:04 
GeneralRe: building an XML page Pin
Farraj24-Apr-10 9:46
MemberFarraj24-Apr-10 9:46 
QuestionImage in XML Pin
farokhian10-Apr-10 5:08
Memberfarokhian10-Apr-10 5:08 
AnswerRe: Image in XML Pin
daveyerwin10-Apr-10 10:29
Memberdaveyerwin10-Apr-10 10:29 
Questionhey I need some help with my coding...... I have an xml and a dtd but they dont validate... can someone help me please? Pin
anubir7-Apr-10 9:44
Memberanubir7-Apr-10 9:44 
AnswerRe: hey I need some help with my coding...... I have an xml and a dtd but they dont validate... can someone help me please? Pin
Stuart Dootson7-Apr-10 14:22
professionalStuart Dootson7-Apr-10 14:22 
GeneralRe: hey I need some help with my coding...... I have an xml and a dtd but they dont validate... can someone help me please? Pin
anubir8-Apr-10 3:07
Memberanubir8-Apr-10 3:07 
GeneralRe: hey I need some help with my coding...... I have an xml and a dtd but they dont validate... can someone help me please? Pin
anubir8-Apr-10 3:08
Memberanubir8-Apr-10 3:08 
GeneralRe: hey I need some help with my coding...... I have an xml and a dtd but they dont validate... can someone help me please? Pin
Stuart Dootson8-Apr-10 4:49
professionalStuart Dootson8-Apr-10 4:49 
QuestionXML File is not updated in IE browser Pin
vdtrip7-Apr-10 8:40
Membervdtrip7-Apr-10 8:40 
QuestionGenerating a new XML file starting with a XML file and applyng XSLT Pin
FJJCENTU5-Apr-10 7:32
MemberFJJCENTU5-Apr-10 7:32 
AnswerRe: Generating a new XML file starting with a XML file and applyng XSLT Pin
FJJCENTU5-Apr-10 8:56
MemberFJJCENTU5-Apr-10 8:56 
QuestionCompiling an XML database with an application Pin
brdavid24-Mar-10 21:19
Memberbrdavid24-Mar-10 21:19 
AnswerRe: Compiling an XML database with an application Pin
Stuart Dootson28-Mar-10 21:46
professionalStuart Dootson28-Mar-10 21:46 

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.