[xml] Adding <script> element with JavaScript Content

Assuming I have a xmlNodePtr that points to my <head> element node, how do I go about adding nodes that are equivalent to the following XHTML?

<script type="text/javascript">
    var ConfigInfoJsonString_ = "{ 'showBuyButton': false,
        'showTryButton': true, 'textImageOverlapPixels': 100 }";

The actual content isn't important, but I do want to insert script code into the tree, and I don't see how to do it.

Any help would be greatly appreciated.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]