[xquery-talk] Printing name of root node of an xml document

Michael Rys mrys at microsoft.com
Sun Jan 9 00:08:38 PST 2005


Root() returns the document node that has no name. Do you want the
top-level node? Say name((fn:root(...)/*)[1]) instead.

HTH
Michael

> -----Original Message-----
> From: talk-bounces at xquery.com [mailto:talk-bounces at xquery.com] On
Behalf
> Of padmapriya ayyagari
> Sent: Saturday, January 08, 2005 11:39 PM
> To: talk at xquery.com
> Subject: [xquery-talk] Printing name of root node of an xml document
> 
> Hello,
> 
> I want to print the name of the root node of an xml document. This
> doesn't seem to work:
> 
> fn:name(fn:root(fn:document("docs/xmark.xml")))
> 
> Can somebody please tell me what hte problem is?
> 
> Thanks,
> Padmapriya
> _______________________________________________
> talk at xquery.com
> http://xquery.com/mailman/listinfo/talk



More information about the talk mailing list