Click here to Skip to main content
14,636,351 members
Home » Discussions » XML / XSL
   

XML / XSL

 
GeneralRe: Desperate seeking answer to simple problem Pin
Axiom70m29-Apr-10 0:16
MemberAxiom70m29-Apr-10 0:16 
QuestionHow ti create sitemap in xml? Pin
JMecier25-Apr-10 0:59
MemberJMecier25-Apr-10 0:59 
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 
i've tried this code for example
XmlDocument XDoc = new XmlDocument();
        XmlElement Xchores = XDoc.CreateElement("day");
        XmlElement XElemRoot = XDoc.CreateElement("chores");
        XElemRoot.AppendChild(Xchores);
        Xchores.SetAttribute("label", "" + this.txtBoxCat.Text + "");
        // Create root node.
        //Add the node to the document.
        XDoc.AppendChild(XElemRoot);
        XmlElement Xjob = XDoc.CreateElement("job");
        while (this.Label5.Text == "1")
        {
            Xjob.SetAttribute("a", "" + this.txtBoxAbout.Text + "");
            Xjob.SetAttribute("b", "" + this.txtBoxSize.Text + "");
            Xjob.SetAttribute("c", "" + this.txtBoxPrice.Text + "");
            Xjob.SetAttribute("d", "" + this.txtBoxAmount.Text + "");
            Xchores.AppendChild(Xjob);
            XDoc.Save("chores2.xml");
        } 


and ive tried it by making a dataset of the elements
    DataSet ds = new DataSet();
        ds.ReadXml("chores2.xml");        DataTable dt = new DataTable();
        dt.Columns.Add(new DataColumn("a"));
        dt.Columns.Add(new DataColumn("b"));
        dt.Columns.Add(new DataColumn("c"));
        dt.Columns.Add(new DataColumn("d"));
        DataRow dr = dt.NewRow();
        dr[0] = ""+this.txtBoxSize.Text+"";
        dr[1] = "" + this.txtBoxAbout.Text + "";
        dr[2] = "" + this.txtBoxAmount.Text + "";
        dr[3] = "" + this.txtBoxSize.Text + "";
        dt.Rows.Add(dr);
        ds.Tables.Add(dt);
        ds.Relations.Add(new
DataRelation("myrel", ds.Tables[1].Columns[0], ds.Tables[0].Columns[0]));
        ds.Relations[0].Nested = true;
        ds.WriteXml("chores2.xml");


and i've tried it by getting the values from an access database and save them as an XML file
also that didnt help approaching my goal
OleDbConnection con = new OleDbConnection();
        con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db.mdb";
        OleDbDataAdapter da = new OleDbDataAdapter("Select * from job1", con);
        DataSet ds = new DataSet("chores");
        DataTable xjob = new DataTable();
        xjob = xjob.Tables["job"];
        da.Fill(ds, "day");
        ds.WriteXml("chores2.xml"); 
*/
        string jobName = this.TextBox2.Text;
        OleDbConnection con = new OleDbConnection();
        con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db.mdb";
        OleDbDataAdapter da = new OleDbDataAdapter("Select * from "+jobName+"", con);
        DataSet ds = new DataSet("chores");
        while (this.Label5.Text == "1")
        {
            da.Fill(ds, "job");
            DataTable dt = new DataTable("job");
            dt = ds.Tables["job"];
            foreach (DataColumn dc in dt.Columns)
            {
                dc.ColumnMapping = MappingType.Attribute;
            }
        }
        ds.WriteXml("chores2.xml"); 


and i tried the XMLDocument, also didnt work exactly how i want it

i would be more than happy if you can explain me what do you mean by
:
option 2 : Create a dedicated class model with serializing/deserializing
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 
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 

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.