xml serialization and conditional attributes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • enricolyb@hotmail.com

    #1

    xml serialization and conditional attributes

    hi,

    i created a xsd schema and corresponding cs file using xsd.exe. now i
    want to skip individual
    items inside an array of elements based on an attribute value.
    e.g.
    <nodes>
    <node attr = "1">
    <node attr = "2">
    <nodes>
    but i only want to have <node attr = "1"written to the xml file, but
    not the <node attr = "2">
    is it possible to do this with XmlAttributeOve rrides? This would be
    easier instead of cloning
    and adjusting the objects before serialization as it is a very deeply
    nested structure.

    if anyone has an idea on this, please let me know.
    many thanks in advance

    enrico

Working...