Ich habe dieses Element in meiner KlasseSerialisierung XML C# .NET2.0
[XmlArray("photos")]
public List<zPhoto> EntityPhotos;
, wenn ich meine Klasse serialisiert ich dieses:
<photos>
<zPhoto id="73102" type="a" />
<zPhoto id="73102" type="b"/>
<zPhoto id="73105" type="a" />
<zPhoto id="73105" type="b" />
</photos>
Um XPath-Abfrage zu vereinfachen Ich möchte füge eine neue Direktive hinzu, die mir ein Ergebnis gibt wie
<photos count="2" >
<zPhoto id="73102" type="a" />
<zPhoto id="73102" type="b"/>
<zPhoto id="73105" type="a" />
<zPhoto id="73105" type="b" />
</photos>
Ich möchte trival Attribute Namen hinzufügen und den Wert festlegen. ist es möglich?
funktioniert nicht in meinem Fall –
Haben Sie die Variable veröffentlicht? – nik0lias
ja, aber es ist nicht kompatibel mit XmlArray Nähte ich –