Skip to content

Modify XmlEments of XmlDocument #134

Answered by renggli
alloza95 asked this question in Q&A
Discussion options

You must be logged in to vote

Sure, what about something along:

final document = XmlDocument.parse(svgXml);
document.findAllElements('path')
    .forEach((element) => element.setAttribute('fill', '#000'));
print(document.toXmlString());

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by renggli
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #133 on February 10, 2022 10:31.