I try to update the URL node, if the node is NON-empty string, it works fine , and generate < URL>some value< /value>my $url = $a->get_node("URL");$url->set_inner_xml( $newurl );once the newurl is empty stringthen set_inner_xml will generate a empty tag < URL/>so, once i cannot $root->get_dcr();it will return < item name="URL" />which is not the correct format of < item name="URL">< value/>< /item>or< item name="URL">< value>< /value>< /item>any idea how to resolve it ?
<URL>value</URL>
... my $dcr = $root->get_dcr(); $dcr =~ s|(<item name="[^"]+")/>|$1><value></value></item>|gms; ...
First - you should consider switching to using XML-style DCRs instead of IWOV-style - so the format would be: <URL>value</URL>
I try to use XML-style DCR , however the DCR cannot recognize it, the data cannot popluate in DCR.< record name='media_release_index' type='content'>< Link> < LinkName>delete< /LinkName> < URL>aa< /URL>< /Link>< Link> < LinkName>delete2< /LinkName> < URL>delete2< /URL>< /Link>< /record>