Click here to Skip to main content
15,889,281 members
Home / Discussions / C#
   

C#

 
Questionbmp & gif convert to led dot matrix display with c# Pin
hosseinzpp28-Jul-12 21:27
hosseinzpp28-Jul-12 21:27 
AnswerRe: bmp & gif convert to led dot matrix display with c# Pin
OriginalGriff28-Jul-12 21:58
mveOriginalGriff28-Jul-12 21:58 
AnswerRe: bmp & gif convert to led dot matrix display with c# Pin
Abhinav S28-Jul-12 22:20
Abhinav S28-Jul-12 22:20 
AnswerRe: bmp & gif convert to led dot matrix display with c# Pin
Dave Kreskowiak29-Jul-12 3:38
mveDave Kreskowiak29-Jul-12 3:38 
GeneralRe: bmp & gif convert to led dot matrix display with c# Pin
yoaz30-Jul-12 5:06
yoaz30-Jul-12 5:06 
GeneralRe: bmp & gif convert to led dot matrix display with c# Pin
Pete O'Hanlon30-Jul-12 5:36
mvePete O'Hanlon30-Jul-12 5:36 
GeneralRe: bmp & gif convert to led dot matrix display with c# Pin
Dave Kreskowiak30-Jul-12 8:18
mveDave Kreskowiak30-Jul-12 8:18 
QuestionAdding InnerText of Child Nodes having same tags into a list. Pin
faiza.butt8927-Jul-12 23:20
faiza.butt8927-Jul-12 23:20 
Hello I am new to xml. I want to read the data from xml file. Here is my xml code :
XML
<overseas_sales>
  <overseas_sale_ad>
    <country>Spain</country>
    <area>Costa Blanca South</area>
    <property_type>house</property_type>
    <price>95000</price>
    <price_type>region</price_type>
    <bathroom_number>2</bathroom_number>
    <bedroom_number>2</bedroom_number>
    <property_status>for-sale</property_status>
<external_id>R214</external_id>
    <photos>
      <photo>http://www.solmarestates.com/images/propimages/R2141.jpg</photo>
      <photo>http://www.solmarestates.com/images/propimages/R2142.jpg</photo>
      <photo>http://www.solmarestates.com/images/propimages/R2143.jpg</photo>
      <photo>http://www.solmarestates.com/images/propimages/R2144.jpg</photo>
      <photo>http://www.solmarestates.com/images/propimages/R2145.jpg</photo>
      <photo>http://www.solmarestates.com/images/propimages/106_1218710541.jpeg</photo>
      <photo>http://www.solmarestates.com/images/propimages/106_1218710543.jpeg</photo>
      <photo>http://www.solmarestates.com/images/propimages/106_1218710546.jpeg</photo>


    </photos>
  </overseas_sale_ad>


Now I want to get all photos in a list . I am trying with code :
 XmlNode root = PropertyDocument.SelectSingleNode("//overseas_sales");
        XmlNodeList nodeList = root.SelectNodes("overseas_sale_ad")

ArrayList ElementsList = new ArrayList();
        foreach (XmlNode n in nodeList)
        {
            if (n.SelectSingleNode("external_id").InnerText == ID)
            {
                XmlNodeList photos = n.SelectNodes("photos");
                foreach(XmlNode ph in photos)
                {
                    ElementsList.Add(ph.SelectSingleNode("photo").InnerText);
                }
            }
        }



But I am getting url of only first photo. I want to get them all in "ElementList". Can anyone help?
AnswerRe: Adding InnerText of Child Nodes having same tags into a list. Pin
OriginalGriff28-Jul-12 0:48
mveOriginalGriff28-Jul-12 0:48 
GeneralRe: Adding InnerText of Child Nodes having same tags into a list. Pin
faiza.butt8928-Jul-12 6:07
faiza.butt8928-Jul-12 6:07 
GeneralRe: Adding InnerText of Child Nodes having same tags into a list. Pin
OriginalGriff28-Jul-12 21:07
mveOriginalGriff28-Jul-12 21:07 
AnswerRe: Adding InnerText of Child Nodes having same tags into a list. Pin
PIEBALDconsult28-Jul-12 5:16
mvePIEBALDconsult28-Jul-12 5:16 
GeneralRe: Adding InnerText of Child Nodes having same tags into a list. Pin
faiza.butt8928-Jul-12 6:11
faiza.butt8928-Jul-12 6:11 
GeneralRe: Adding InnerText of Child Nodes having same tags into a list. Pin
PIEBALDconsult29-Jul-12 16:30
mvePIEBALDconsult29-Jul-12 16:30 
Questionre-activate form Pin
Jassim Rahma27-Jul-12 23:13
Jassim Rahma27-Jul-12 23:13 
AnswerRe: re-activate form Pin
Dave Kreskowiak28-Jul-12 3:43
mveDave Kreskowiak28-Jul-12 3:43 
QuestionASP.NET ValidationSummary not displaying RegularExpressionValidator results? Pin
jojoba201127-Jul-12 20:15
jojoba201127-Jul-12 20:15 
AnswerRe: ASP.NET ValidationSummary - Repost Pin
Richard MacCutchan27-Jul-12 21:34
mveRichard MacCutchan27-Jul-12 21:34 
QuestionFail Uppercase? Pin
Midnight Ahri27-Jul-12 17:32
Midnight Ahri27-Jul-12 17:32 
GeneralRe: Fail Uppercase? Pin
Wes Aday27-Jul-12 17:43
professionalWes Aday27-Jul-12 17:43 
GeneralRe: Fail Uppercase? Pin
AmitGajjar27-Jul-12 17:46
professionalAmitGajjar27-Jul-12 17:46 
AnswerRe: Fail Uppercase? Pin
Midnight Ahri27-Jul-12 18:04
Midnight Ahri27-Jul-12 18:04 
AnswerRe: Fail Uppercase? Pin
Eddy Vluggen28-Jul-12 7:36
professionalEddy Vluggen28-Jul-12 7:36 
GeneralRe: Fail Uppercase? Pin
BobJanova29-Jul-12 23:02
BobJanova29-Jul-12 23:02 
QuestionRe: Fail Uppercase? Pin
Eddy Vluggen30-Jul-12 0:11
professionalEddy Vluggen30-Jul-12 0:11 

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.