0
ExCSS을 사용하여 스타일 시트 문자열을 구문 분석하고 조작합니다. 여태까지는 그런대로 잘됐다.ExCSS 파서를 사용하여 StyleRules를 문자열 출력으로 가져 오는 방법
그러나 조작 된 스타일 규칙을 문자열로 변환하는 방법에 대한 문서는 찾을 수 없습니다.
코드가이 질문에 관련없는 수 있지만,이 내가 뭘하는지입니다 :
private string ManipulateCSS(string styles)
{
ExCSS.Parser parser = new ExCSS.Parser();
var stylesheet = parser.Parse(styles);
// here I perform specific manipulations
// which are not relevant to this question...
stylesheet.StyleRules
.SelectMany(r => r.Declarations)
.Where(d => d.Name == "<something>"
...
...
// Now, the next line is where I'm having issues:
// how to return the whole string with styles out of this ExCSS parser?
return stylesheet.StyleRules.ToString();
}
여러분의 도움에 감사드립니다!