Click here to Skip to main content
14,392,146 members
   

XML / XSL

 
AnswerRe: Getting XML content Pin
Erik Molenaar31-May-11 23:30
MemberErik Molenaar31-May-11 23:30 
GeneralRe: Getting XML content Pin
stevenykl1-Jun-11 1:21
Memberstevenykl1-Jun-11 1:21 
QuestionHelp to write Xquery Pin
Neno9930-Apr-11 4:37
MemberNeno9930-Apr-11 4:37 
AnswerRe: Help to write Xquery Pin
jschell30-Apr-11 13:57
Memberjschell30-Apr-11 13:57 
GeneralRe: Help to write Xquery Pin
Neno993-May-11 17:07
MemberNeno993-May-11 17:07 
GeneralRe: Help to write Xquery Pin
Richard MacCutchan3-May-11 22:58
mveRichard MacCutchan3-May-11 22:58 
GeneralRe: Help to write Xquery Pin
jschell4-May-11 9:47
Memberjschell4-May-11 9:47 
QuestionHow to bind the data into a class object from a list. Pin
Rocky2329-Apr-11 1:57
MemberRocky2329-Apr-11 1:57 
Hi can anyone tell me, how to bind a data to class objects from a list, so that i can pass it in xml request..

here is my code in xsd generated class.

public partial class SetValue
    {

        private string dANameField;

        private string dAIDField;

        private SetValueType setValueTypeField;

        /// <remarks/>
        public string DAName
        {
            get
            {
                return this.dANameField;
            }
            set
            {
                this.dANameField = value;
            }
        }

        /// <remarks/>
        public string DAID
        {
            get
            {
                return this.dAIDField;
            }
            set
            {
                this.dAIDField = value;
            }
        }

        /// <remarks/>
        public SetValueType SetValueType
        {
            get
            {
                return this.setValueTypeField;
            }
            set
            {
                this.setValueTypeField = value;
            }
        }
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://xml.abc.com/ns/msjava/lrm")]
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://xml.abc.com/ns/msjava/lrm", IsNullable = false)]
    public partial class SetValueType
    {

        private string valueTypeIDField;

        private string valueTypeField;

        private string valueField;

        private Function functionField;

        private Field fieldField;

        /// <remarks/>
        public string ValueTypeID
        {
            get
            {
                return this.valueTypeIDField;
            }
            set
            {
                this.valueTypeIDField = value;
            }
        }

        /// <remarks/>
        public string ValueType
        {
            get
            {
                return this.valueTypeField;
            }
            set
            {
                this.valueTypeField = value;
            }
        }

        /// <remarks/>
        public string Value
        {
            get
            {
                return this.valueField;
            }
            set
            {
                this.valueField = value;
            }
        }

        /// <remarks/>
        public Function Function
        {
            get
            {
                return this.functionField;
            }
            set
            {
                this.functionField = value;
            }
        }

        /// <remarks/>
        public Field Field
        {
            get
            {
                return this.fieldField;
            }
            set
            {
                this.fieldField = value;
            }
        }
               
    }



here i have to do something, so that i can add the data in this list to class type(SetValueType), so that later i will convert it into xml format..

 SetValue DAESetvalue = new SetValue
            {
                DAID=oSetValue.DAID,
                DAName=oSetValue.DAName
            };
            DADirective.SetValue = DAESetvalue;

List<SetValueType> SetValueTypeList = new List<SetValueType>();
GetValueTypeCondition(gValueTypeCondition,SetValueTypeList);
public void GetValueTypeCondition(Grid gValueTypeCondition,List<SetValueType> SetValueTypeList)
        {
            int rowcount = 0;
            if (gValueTypeCondition.RowDefinitions != null)
                rowcount = gValueTypeCondition.RowDefinitions.Count;
            for (int i = 0; i < rowcount; i++)
            {
                SetValueType oSetValueType = new SetValueType();                
               // bool isValueType = false;
                foreach (UIElement element in gValueTypeCondition.Children.Cast<UIElement>().Where(element => Grid.GetRow(element) == i))
                {
                    if (element is ComboBox)
                    {
                       // isValueType = true;
                        ComboBox cbvaluetype = (ComboBox)element;

                        if (cbvaluetype.Uid != null)
                        {
                          Object obj = ((ComboBoxItem)(cbvaluetype.SelectedItem)).Tag;
                            if (obj != null)
                            {                              
                                if (cbvaluetype.Uid == DataKey.FUNCTION_KEY)
                                {
                                    DAFunction dafunction = (DAFunction)obj;
                                    oSetValueType.ValueTypeID = "2";
                                    oSetValueType.ValueType = "Function";

                                    oSetValueType.Function.FunctionID = dafunction.FunctionID;
                                    oSetValueType.Function.FunctionName = dafunction.FunctionName;
                                    oSetValueType.Function.DataType1 = dafunction.DataType1;
                                    oSetValueType.Function.DataType2 = dafunction.DataType2;
                                    oSetValueType.Function.DataType3 = dafunction.DataType3;
                                }
                                else if (cbvaluetype.Uid == DataKey.COLUMN_CONDITION_KEY)
                                {
                                    DAColumn dacobj = (DAColumn)obj;
                                    oSetValueType.ValueTypeID = "3";
                                    oSetValueType.ValueType = "Field";
                                    oSetValueType.Field.FieldID = dacobj.id;
                                    oSetValueType.Field.FieldValue = dacobj.name;
                                }
                            }
                        }
                    }
                    else if (element is TextBox)
                    {
                        TextBox txtValueType = (TextBox)element;
                        switch (txtValueType.Uid)
                        {
                            case DataKey.TEXT_VALUE_KEY:
                                oSetValueType.ValueTypeID = "1";
                                oSetValueType.ValueType = "Value";
                                oSetValueType.Value = txtValueType.Text.Replace("_", "").Trim();
                                break;
                            case DataKey.TEXT_FUNCTION_VALUE_KEY:
                                oSetValueType.Function.FunctionValue = txtValueType.Text.Replace("_", "").Trim();                                
                                break;
                        }
                    }
                }
                //if (isValueType)
                    SetValueTypeList.Add(oSetValueType);
            }
        }


so any help like how to do it...
AnswerRe: How to bind the data into a class object from a list. Pin
jschell29-Apr-11 10:47
Memberjschell29-Apr-11 10:47 
QuestionXML Search Pin
DJ24526-Apr-11 21:49
MemberDJ24526-Apr-11 21:49 
AnswerRe: XML Search Pin
GregStevens6-Jul-11 16:43
MemberGregStevens6-Jul-11 16:43 
QuestionXpath syntax. Pin
Mel Padden4-Apr-11 23:34
MemberMel Padden4-Apr-11 23:34 
AnswerRe: Xpath syntax. Pin
Tarun.K.S5-Apr-11 0:40
MemberTarun.K.S5-Apr-11 0:40 
GeneralRe: Xpath syntax. Pin
Mel Padden5-Apr-11 1:06
MemberMel Padden5-Apr-11 1:06 
QuestionHelp to make condition in xsd file Pin
MrKBA30-Mar-11 23:41
MemberMrKBA30-Mar-11 23:41 
AnswerRe: Help to make condition in xsd file Pin
RugbyLeague19-Apr-11 3:26
MemberRugbyLeague19-Apr-11 3:26 
Questionattribute restriction [modified] [Solved] Pin
V.24-Mar-11 23:40
professionalV.24-Mar-11 23:40 
QuestionVisual Studio's XSD vs Liquid Technologies Code Generator Pin
Ger Hayden16-Mar-11 5:40
MemberGer Hayden16-Mar-11 5:40 
Questionusing search web service Pin
ekaup12-Mar-11 0:36
Memberekaup12-Mar-11 0:36 
AnswerRe: using search web service Pin
jschell13-Mar-11 11:16
Memberjschell13-Mar-11 11:16 
GeneralRe: using search web service Pin
ekaup13-Mar-11 13:22
Memberekaup13-Mar-11 13:22 
QuestionHow limitate the attribute of the root to it? Pin
Pierre besquent24-Feb-11 23:06
MemberPierre besquent24-Feb-11 23:06 
AnswerRe: How limitate the attribute of the root to it? Pin
dasblinkenlight9-Mar-11 3:20
Memberdasblinkenlight9-Mar-11 3:20 
QuestionIs Serialization worth it? Pin
Ger Hayden22-Feb-11 0:47
MemberGer Hayden22-Feb-11 0:47 
Questiongenerate xml based on schema. Pin
Ramkumar_S16-Feb-11 16:33
MemberRamkumar_S16-Feb-11 16:33 

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.