|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] Printing name of root node of an xml documentMichael Kay mhk at mhk.me.ukSun Jan 9 09:27:06 PST 2005
fn:root() is redundant, because fn:document() returns the root node of the
document anyway. But this is a nameless document node. You want the
outermost element node, which is a child of the document node. Try
fn:name(fn:document("x.xml")/*)
Incidentally, in most environments the fn: prefix on function calls is not
needed.
Michael Kay
http://www.saxonica.com/
> -----Original Message-----
> From: http://xquery.com/mailman/listinfo/talk
> [mailto:http://xquery.com/mailman/listinfo/talk] On Behalf Of padmapriya ayyagari
> Sent: 09 January 2005 07:39
> To: http://xquery.com/mailman/listinfo/talk
> Subject: 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
> _______________________________________________
> http://xquery.com/mailman/listinfo/talk
> http://xquery.com/mailman/listinfo/talk
>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








