Re: XML::LibXML - appending children and finding them again
by Petr Pajas other posts by this author
Jan 19 2005 12:14PM messages near this date
view in the new Beta List Site
Re: XML::LibXML - appending children and finding them again
|
Re: XML::LibXML - appending children and finding them again
& XSLT On Tuesday 18 January 2005 21:20, Christopher Pryce wrote:
> On Jan 18, 2005, at 2:05 PM,
> perl-xml-request@[...].com
>
> wrote:
> > Don't mix NS and non NS createElement calls.
> > Changing your non NS call by
> >
> > my $docProps = $dom->
> > createElementNS('urn:schemas-microsoft-com:office:offic
> >e', 'o:DocumentProperties');
> >
> > fixes the problem.
> > (A little my $o = 'urn:...'; might help keeping you
> > code tidy).
>
> Thank you. The previous posts helped me realize the
> errors. I was not creating the objects in the namespace,
> I was simply making them with the prefix.
Right.
> So now I use the following code, which seems to work. Is
> the addNewChild($NS, $name) the correct usage? Or will it
> bite me later?
Looks good. The only snag might be the following quote from
the documentation:
this function is not part of the DOM specification and its
use will limit your code to XML::LibXML.
<snip>
-- Petr
Attachments:
unknown1
unknown2
unknown3
unknown4
Thread:
Christopher Pryce
Petr Pajas
Christopher Pryce
Petr Pajas
|