nagesh has asked for the wisdom of the Perl Monks concerning the following question:
I want to know if I can create a new XML element(child) using a $simpleType_nodes->item(0) i.e is a XML::DOM::Element object. The code below is similar to my program. I have a createElement method which does not exist in XML::DOM::Element module thus presently i get an error. If I can create a Element as child how would I do it. Thank you,
Nageshuse XML::DOM; my $parser = new XML::DOM::Parser; my $root_node = $parser->parsefile($field_definition_file); ##actually returns only one node my $simpleType_nodes=$root_node->getElementsByTagName("simpleType" +); $simpleType_nodes->item(0)->createElement("length", value=>$maxlen +gth_hash{$field_name} );
|
|---|