Re: generating attributes and content for an element
Manuel Souto Pico <[email protected]>
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Message-ID | <[email protected]> |
Hi again Shlomi,
Do you know if the module XML::LibXML exists for Perl under Windows?
(I'm using ActivePerl-5.8.8). I couldn't find it, and in turn I
installed libxml-perl but still I get a message saying "Can't locate
XML/LibXML.pm in @INC etc."
Now I hope you don't tell me "I suggest you don't use Windows. I don't
use it and have a policy against helping people who do. Try using Linux
or FreeBSD or whatever instead. Windows is philosophically bad, bla bla". :D
Sorry, I couldn't resist. It's just a joke, please bon't get offended ;)
I'm a Darwin-user myself but at work unfortunately I have to use Windows ;)
If you have any idea about isntalling XML::LibXML with PPM it would be
great to know.
Thanks for your great help.
Manuel
Shlomi Fish escribió:
> On Monday 24 November 2008, Manuel Souto Pico wrote:
>
>> By the way, I forgot to mention that I'm using XML::Simple
>>
>>
>
> Yes, I figured it out. I suggest you don't use XML::Simple. I don't use it and
> have a policy against helping people who do. Try using XML::Writer or
> XML::LibXML or whatever instead. XML::Simple is philosophically bad, and when
> done half-properly, is no longer simple.
>
> Regards,
>
> Shlomi Fish
>
>
>> Cheers, Manuel
>>
>> Manuel Souto Pico escribió:
>>
>>> Hi,
>>>
>>> This is my first email to this list, so hello everyone! :)
>>>
>>> I'm starting to learn XML with Perl (and I'm not an experienced Perl
>>> programmer either), so I'd be thankful if you could be patient ;)
>>>
>>> The doubt that I have is about generating both content* and attributes
>>> for an element.
>>>
>>> (*): content which is not other elements, that is.
>>>
>>> By means of
>>> my $data = {
>>> e => ['element value'],
>>> a => 'attribute value'*
>>> *};
>>> I can get this:
>>> <root a="attribute value">
>>> <e>element value</e>
>>> </root>
>>> However, what I'm after is something like
>>> <root>
>>> <e a="attribute value">element value</e>
>>> </root>
>>> I would be very grateful for any ideas.
>>>
>>> Thank you!
>>>
>>> Manuel
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Perl-XML mailing list
>>> [email protected]
>>> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>>>
>
>
>
>
_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs