The XPath expression ./id will try to find an element <id> below the current node.
What you are looking for is an attribute named id of the current node. The XPath syntax for attributes is @id, but I guess you're better off using the ->getAttribute() method:
my $id = $object11->getAttribute('id');
In reply to Re: Replace xml first id
by Corion
in thread Replace xml first id
by michael99
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |