Hi,
XML in this case is a data type, just try this
alert(XML("<test><ex>abc</ex></test>").toXMLString());
or just
alert(<test><ex>abc</ex></test>.toXMLString());
which should give you the pretty-printed xml.
-Thomas
PS: http://www.ecma-international.org/publications/standards/Ecma-357.htm shows
where it's heading
----- Ursprüngliche Mail ----
Von: Jon Stritar <[EMAIL PROTECTED]>
An: Mozdev Project Owners List <[email protected]>
Gesendet: Mittwoch, den 19. April 2006, 23:15:00 Uhr
Betreff: Re: [Project_owners] Pretty print an XML string
Do you know how to access the XML function from an XPCOM context?
Firefox just reports the following error:
Error: xml is a reserved identifier
Jon
On Wed, 2006-04-19 at 22:16 +0200, Brian King wrote:
> Alex Vincent wrote:
> > You've gotten my attention. DevMo is rather sparse on examples of the
> > XML object, and I'm not able to make what you describe work from the
> > URL bar with XML or XUL documents:
> >
> > javascript:alert(XML(document).toXMLString())
>
> What type is the document parameter in this example? It has to be a string.
>
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners