Click here to Skip to main content
15,885,216 members
Home / Discussions / XML / XSL
   

XML / XSL

 
AnswerRe: Getting XML content Pin
Erik Molenaar31-May-11 22:30
Erik Molenaar31-May-11 22:30 
GeneralRe: Getting XML content Pin
stevenykl1-Jun-11 0:21
stevenykl1-Jun-11 0:21 
QuestionHelp to write Xquery Pin
Neno9930-Apr-11 3:37
Neno9930-Apr-11 3:37 
AnswerRe: Help to write Xquery Pin
jschell30-Apr-11 12:57
jschell30-Apr-11 12:57 
GeneralRe: Help to write Xquery Pin
Neno993-May-11 16:07
Neno993-May-11 16:07 
GeneralRe: Help to write Xquery Pin
Richard MacCutchan3-May-11 21:58
mveRichard MacCutchan3-May-11 21:58 
GeneralRe: Help to write Xquery Pin
jschell4-May-11 8:47
jschell4-May-11 8:47 
QuestionHow to bind the data into a class object from a list. Pin
Rocky2329-Apr-11 0:57
Rocky2329-Apr-11 0: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 9:47
jschell29-Apr-11 9:47 
QuestionXML Search Pin
DJ24526-Apr-11 20:49
DJ24526-Apr-11 20:49 
AnswerRe: XML Search Pin
GregStevens6-Jul-11 15:43
GregStevens6-Jul-11 15:43 
QuestionXpath syntax. Pin
Mel Padden4-Apr-11 22:34
Mel Padden4-Apr-11 22:34 
AnswerRe: Xpath syntax. Pin
Tarun.K.S4-Apr-11 23:40
Tarun.K.S4-Apr-11 23:40 
GeneralRe: Xpath syntax. Pin
Mel Padden5-Apr-11 0:06
Mel Padden5-Apr-11 0:06 
QuestionHelp to make condition in xsd file Pin
MrKBA30-Mar-11 22:41
MrKBA30-Mar-11 22:41 
AnswerRe: Help to make condition in xsd file Pin
RugbyLeague19-Apr-11 2:26
RugbyLeague19-Apr-11 2:26 
Questionattribute restriction [modified] [Solved] Pin
V.24-Mar-11 22:40
professionalV.24-Mar-11 22:40 
QuestionVisual Studio's XSD vs Liquid Technologies Code Generator Pin
Ger Hayden16-Mar-11 4:40
Ger Hayden16-Mar-11 4:40 
Questionusing search web service Pin
ekaup11-Mar-11 23:36
ekaup11-Mar-11 23:36 
AnswerRe: using search web service Pin
jschell13-Mar-11 10:16
jschell13-Mar-11 10:16 
GeneralRe: using search web service Pin
ekaup13-Mar-11 12:22
ekaup13-Mar-11 12:22 
QuestionHow limitate the attribute of the root to it? Pin
Pierre besquent24-Feb-11 22:06
Pierre besquent24-Feb-11 22:06 
AnswerRe: How limitate the attribute of the root to it? Pin
dasblinkenlight9-Mar-11 2:20
dasblinkenlight9-Mar-11 2:20 
QuestionIs Serialization worth it? Pin
Ger Hayden21-Feb-11 23:47
Ger Hayden21-Feb-11 23:47 
Questiongenerate xml based on schema. Pin
Ramkumar_S16-Feb-11 15:33
Ramkumar_S16-Feb-11 15: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.