[IronPython] XmlDocument or XDocument in Python/Silverlight

Jimmy Schementi Jimmy.Schementi at microsoft.com
Tue Jul 15 05:44:16 CEST 2008


Jonathan Slenders wrote:
>
> And another question, which is rather Silverlight then IronPython
> related. I hope it's okey to ask it here.
> How should I create a TextNode from Silverlight with IronPython code?
> In javascript, one would:
>
> node = document.createTextNode("text"); element.appendChild(node);
>
> According to the MSDN documentation, the HtmlDocument class doesn't
> have a createTextNode, and I can't find it anywhere else. Michael his
> book has been extremely useful for me, but he uses innerHtml which i
> really don't like. InnerHtml is is an old-style method for DOM-
> manipulation, and unsafe by definition. (it allows you to insert HTML
> code)

Did you figure this out yet? Actually, not sure of the answer, but I "think" Silverlight doesn't support this. But it should. I sent a mail off to the Silverlight guys who work on the HTML bridge a while ago. I'll check back with them again, and get back to you.

~Jimmy



More information about the Ironpython-users mailing list