Home/ASP.NET Forums/Data Access/XML and XmlDataSource Control/.WriteStartElement and endelement with condition

.WriteStartElement and endelement with condition [Answered]RSS

5 replies

Last post Dec 08, 2010 03:23 AM by hj

  • hj hj

    Participant

    1519 Points

    539 Posts

    Re: .WriteStartElement and endelement with condition

    Dec 08, 2010 03:23 AM|hj|LINK

    Decker Dong - MSFT

    hj's answer is quite right ........

  •  

     

    thanks for confirmation.

     

    Decker Dong - MSFT

    If Not (x = y) Then   

  •    xmlWriter.WriteStartElement("Students")   
  •    xmlWriter.WriteAttributeString("StudentType""ABC")   
  •    xmlWriter.WriteEndElement()   
  •  
  •    // Here you can start a new one……
  • End If
  •  

    that is exactly how he should proceed.

    Please remember to mark all helpful posts as answers. it will help other visitors to find their answers when redirected here from a search engine.
  • ‹ Previous Thread|Next Thread ›