R
Richard Bell
Given an HTML:arseTree node $n. Given its content as returned by my
@content = $n->content_list(). @content potentially consists of text or
references to other nodes. Regarding those elements of @content
containing text:
How does one modify the content of a specific text child within the
containing node?
How does one delete a specific text child within the containing node?
Consider the HTML fragment:
<div> String 1 <h3> String 2 </h3> String 3 <h3> String 4 </h3> String 5
</div>
$n->content_list would contain ( 'String 1', ref to <h3> containing
String 2, 'String 3', ref to <h3> containing String 4, 'String 5' )
I can delete the child nodes with $ref->delete. But how do I mess with
the strings?
Thanks.
@content = $n->content_list(). @content potentially consists of text or
references to other nodes. Regarding those elements of @content
containing text:
How does one modify the content of a specific text child within the
containing node?
How does one delete a specific text child within the containing node?
Consider the HTML fragment:
<div> String 1 <h3> String 2 </h3> String 3 <h3> String 4 </h3> String 5
</div>
$n->content_list would contain ( 'String 1', ref to <h3> containing
String 2, 'String 3', ref to <h3> containing String 4, 'String 5' )
I can delete the child nodes with $ref->delete. But how do I mess with
the strings?
Thanks.