Home > Archive > PERL Beginners > March 2005 > ending attributes in XML::Writer
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
ending attributes in XML::Writer
|
|
| Nuno Morgadinho 2005-03-26, 3:55 pm |
| I'am using XML::Writer to create a XML file that is then read by another
application. This other application is expecting a XML in the form of
<starttag/> (with the slash in the starttag ending the attribute) but
using XML::Writer I can't find a way to output this and my application
fails.
I know both </endtag> and <starttag/> are valid to end an attribute, both
are valid XML and an application that doesn't account for that should be
shot on site but I don't have a gunfire (in other words, I need to use
this application and I can't correct the problem).
Is there a way in XML::Writer to end attributes with a slash ending the
start tag instead of the normal </endtag>? If not, does anyone know of a
workaround for this problem?
| |
| Offer Kaye 2005-03-27, 8:55 am |
| On Sat, 26 Mar 2005 17:02:11 +0000, Nuno Morgadinho wrote:
> I'am using XML::Writer to create a XML file that is then read by another
> application. This other application is expecting a XML in the form of
> <starttag/> (with the slash in the starttag ending the attribute) but
> using XML::Writer I can't find a way to output this and my application
> fails.
>
> I know both </endtag> and <starttag/> are valid to end an attribute, both
> are valid XML and an application that doesn't account for that should be
> shot on site but I don't have a gunfire (in other words, I need to use
> this application and I can't correct the problem).
>
> Is there a way in XML::Writer to end attributes with a slash ending the
> start tag instead of the normal </endtag>? If not, does anyone know of a
> workaround for this problem?
>
Use the "emptyTag" method instead of the "startTag" and "endTag" methods.
Hope this helps,
--
Offer Kaye
|
|
|
|
|