Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: XML Newbie

by mirod (Canon)
on Nov 16, 2012 at 12:49 UTC ( #1004180=note: print w/ replies, xml ) Need Help??


in reply to Re^2: XML Newbie
in thread XML Newbie

Duh! you need to set #not_empty to a true value. That will teach me to change tested code right before posting it.

So it should be $elt->parent->set_att( '#not_empty', 1) if $elt->parent;

regarding the update: in the code I wrote, the twig is purged after each element, that's why you need the #not_empty attribute, because within the twig handler, every single element appears empty, except if it contains text.


Comment on Re^3: XML Newbie
Select or Download Code
Re^4: XML Newbie
by remiah (Hermit) on Nov 16, 2012 at 23:19 UTC

    Thanks for reply.

    It works fine.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1004180]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2014-09-20 04:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (152 votes), past polls