JavaScript is not enabled on your browser and in order to properly use Coder Profile JavaScript is required.
To view instructions on how to enable JavaScript on your browser click here .
Hi,
i write a template class. All templates are in an xml-file. To handle comments in html-code (allowed/not allowed), I will delete the "<!-- -->"- and "/* */"-comments.
How can I save the "new" string in my xml-object?
CODE:
Copy / Restore :: Remove Scroll Bars
function parseXML( $s )
{
# load xml-file
$tf = $this -> path . chr ( 0x2f
) . $s . $this -> suffix_list [ 'data_file' ] ;
$xml = @ simplexml_load_file( $tf , null , LIBXML_NOCDATA) ;
/*
complete this part:
delete all html-comments */
#foreach ($xml as $node => $nodevalue) {
# $nodevalue =
preg_replace("#/\*(.*?)\*/#s", "", $nodevalue);
# $nodevalue =
preg_replace("#<!--(.*?)-->#s", "", $nodevalue);
# problem: how can i rewrite the
node-content?
# $xml[$node] = $nodevalue; // ? <- this is my
problem. How can I save this data in my xml-object??? :(
#}
return $xml ;
}
Select what you want to copy and in doing so you will keep the formatting when pasting it.
CODE:
Copy / Restore :: Remove Scroll Bars
<template>
<meta />
<template_page>
< [ CDATA[
<html>
<head>
<style>
/* i will delete this comment */
</style>
</head>
<body>
<!-- and this
comment -->
</body>
</html>
]]>
</template_page>
<template_nav>
< [ CDATA[
<!-- and also this -->
<a onclick ="blubb" />
]]>
</template_nav>
</template>
Select what you want to copy and in doing so you will keep the formatting when pasting it.
Kind regards, Lucas
I don't quite understand.
Hi,
the xml is in my object $xml. I would like parse the html-code in the simplexmlobjects, replace all comments in the html-code an save the string of the html-code in my object again.
What is the correct syntax?
I've figured out why I don't understand...because i haven't got that far yet. lol. Sorry. :(
GOOOOOD MORNING!!!!!!!!!
Hahahaha that's amazing :D
So? 'kay. And i believed it was a joke. hihihi I'm glad 4 u.
The xml is my new little madam. With gucci-dress! In pale pink !
ummmmmmmmmmm ya i dont really know wat else to say. sha lee lee lee
Anyone here to can post a answere about the topic?
You do not have permission to post replies to topics in this board. If you want to join in with discussions and create new topics please register. If you want to register your own free account with us, please click here .
Latest News About Coder Profile
Coder Profile Poll
If you made money from keeping your profile up to date, say $30 and up, per month. What extra time would you spend on your profile?
No extra time A few hours at weekends A whole day each week Every minute i can get freeplease login to cast your vote and see the results of this poll
Latest Coder Profile Changes
Coder Profile was last updated
3.49 Years Ago