Link to home
Create AccountLog in
Avatar of MoreThanDoubled
MoreThanDoubled

asked on

XML Syntax

Hi all,



I am creating a xml document in C# and i needd to know what the syntax is to build this structure(see attachment)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Data;
using System.Data.SqlClient;


namespace createxml
{
    class Main
    {
        XmlDocument xmldoc;
        XmlNode xmlnode;
        XmlElement xmlelem;
        XmlElement xmlelem2;
        XmlText xmltext;


        xmldoc = new XmlDocument();

            xmlnode = xmldoc.CreateNode(XmlNodeType.XmlDeclaration,"", "");
            xmldoc.AppendChild(xmlnode);

            //add the root element
            xmlelem = xmldoc.CreateElement("root");
             ........
Hw do i build the rest of the elements based on the attachment?

Thanks for the help
Avatar of Wim_Bl
Wim_Bl
Flag of Belgium image

Hi,

could it be that you forgot the attachment here?

Greetings
Avatar of MoreThanDoubled
MoreThanDoubled

ASKER

attaching attachment...
RootCapture.JPG
ASKER CERTIFIED SOLUTION
Avatar of Wim_Bl
Wim_Bl
Flag of Belgium image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
can you show me your output for the logic you provided?
Wim_Bl,

I really appreciate you taking the time to help me with this but the code snippet is not producing the expected results, this is why i asked for your output of the logic you gave me.

I have wasted 3 days trying to figure this out so any help will be appreciated.

Thanks
nevermind, i see what i am missing.