Read TEXT from within 2 xml nodes (tricky I think ...)
-
Hello, The question is simple but I found it tricky to accomplish. I want to extract all the text from within the default.code node:
< default.code >
<!--
google_ad_client = "<?php echo($adsense_pubid);?>";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "image";
google_ad_channel = "";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "245917";
google_color_text = "555555";
google_color_url = "555555";
google_ui_features = "rc:6";
//-->
< /default.code >The problem is that when I read it, the is also considered a XML node. I simply want to extract the javascript code block. How can I do this ? Thanks
-
Hello, The question is simple but I found it tricky to accomplish. I want to extract all the text from within the default.code node:
< default.code >
<!--
google_ad_client = "<?php echo($adsense_pubid);?>";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "image";
google_ad_channel = "";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "245917";
google_color_text = "555555";
google_color_url = "555555";
google_ui_features = "rc:6";
//-->
< /default.code >The problem is that when I read it, the is also considered a XML node. I simply want to extract the javascript code block. How can I do this ? Thanks
The script tag IS an XML node. However you can select the default.code and select the InnerXml ( from memory ) to get the script blocks with the XML tags which also happen to be script tages.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.