Re: XML::XPath createNode with the same name??

Dave Howorth <[email protected]>
Newsgroups gmane.comp.lang.perl.xml
Organization MRC Centre for Protein Engineering
Message-ID <[email protected]>
Brian wrote:
> Using XML::XPAth I can create one child node, but I am having issues
> creating multiple nodes with the same name.  Is this possible with
> XML::XPath?  If so, can I get an example?  I've been wrestling with this
> for the better part of a day and really need to figure out the best way to
> do this. I'm trying to avoid installing yet another perl module if I can,
> but if what I need isn't possible with XML::XPath, I'm open to suggestions
> on what to try next.

Perhaps I'm missing something obvious but can't you just index the node,
as specified at:

<http://www.w3.org/TR/xpath/#path-abbrev>

/doc/chapter[5]/section[2] selects the second section of the fifth
chapter of the doc

i.e. use a path like that to create the children

Cheers, Dave
_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.