我試着去與風格類似的XElement:的XElement增添風采
<g style="fill-opacity:0.7">
這樣的IM這樣做:
XElement root = new XElement("g");
root.SetAttributeValue("style",
from attributes in Child.Attributes
where char.IsUpper(attributes.Key[0]) & !attributes.Value.ToString().StartsWith(transformNS)
select new XAttribute("style", attributes.Key + ":" + attributes.Value));
,但我已經是
<g style="System.Linq.Enumerable+WhereSelectEnumerableIterator`2[System.Collections.Generic.KeyValuePair`2[System.String,System.Object],System.Xml.Linq.XAttribute]">
有人能夠幫助我?
問候
你們是不是要選擇一個子屬性? – 2013-04-04 11:55:00
可能會超過一個 – user1977936 2013-04-04 11:56:19
那麼你想如何結合它們?您的代碼不包含任何要做的事情。 – 2013-04-04 11:57:03