hey guys. @fabio - my original example was using slick and moo 1.3 but
it failed in safari and chorme. i could grab the node with slick but
not get the node value. in firefox i cheated and treating the node as
a html element and used node.get("text")
On Jul 22, 2:54 am, Sanford Whiteman <[email protected]>
wrote:
> > getElementsByClassName, getElementById and some others are never usd on XML
> > documents. The only function that works on them is getElementsByTagName.
>
> Ja, I was saying ByClassName and ById wouldn't work on the documents
> because they are schemaless islands, but you're right that ClassName
> primarily wouldn't work on the document because it is XML, period, not
> just because it is not in the main DOM. Oops.
>
> On the other hand, getElementById is in DOM 2 Core and is equally
> applicable to XML + HTML documents.
>
> The catch is that without an ID attribute defined in a loaded schema,
> there is nothing for ById to search for -- and XHR-fetched XML can't
> be relied upon to have schemas loaded (usually by design but not by
> intuition). In my tests, when a schema with an ID type can be loaded,
> then it works fine: for example, if the main document is an
> XMLDocument then getElementById will work, finding els where
> (attributes.id.isId && attributes.id.value = <the_id>). If you build
> an XMLDoc island manually with a DOCTYPE it also works. So I would
> still say the main reason that ById doesn't work on a schemaless
> document is that it's not in the DOM and so doesn't get the main
> document's schema, not that it's XML.
>
> -- S.