You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by "Dave Yuill [thalez]" <th...@hotmail.com> on 2002/06/11 02:19:42 UTC

wildcards

Hi All,

I've recently upgraded from Xerces 2.0beta4  to 2.0.1.  I have a structure
like this:

<root>
<data>blah blah blah</data>
<data>foo bar baz</data>
<dataMORE>more blah foo baz</dataMORE>
<unused>dont want me<unused>
<data>blah blah blah</data>
<dataMORE>more blah foo baz</dataMORE>
<data>blah blah blah</data>
</root>

I used to use '*' wildcards to get all of the wanted children at once and in
order, and now it doesn't seem to work anymore.

doc.getElementsByTagName("data*");

..used to return all 'data' and 'dataMORE' elements.  Now it returns none...
Are the wildcards gone? Would it happen to be an option or somthing? ..or am
I just crazy? :)

Thanks,
-Dave

PS:  Xerces is awesome!  It is extremely useful.  My thanks go to everyone
involved in this wondrous project.




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: wildcards

Posted by "Dave Yuill [thalez]" <th...@hotmail.com>.
Makes good sense.  I was just curious anyway.  It's easy to get around.
Turns out I don't even have to deal with unused tags, and can simply call
getChildNodes().  Super, thanks again.

-Dave


----- Original Message -----
From: "Elena Litani" <el...@ca.ibm.com>
To: <xe...@xml.apache.org>
Sent: Tuesday, June 11, 2002 9:44 AM
Subject: Re: wildcards


> Hi Dave,
>
> "Dave Yuill [thalez]" wrote:
> > I used to use '*' wildcards to get all of the wanted children at once
and in
> > order, and now it doesn't seem to work anymore.
> >
> > doc.getElementsByTagName("data*");
> >
> > ..used to return all 'data' and 'dataMORE' elements.  Now it returns
none...
>
> If you got this behavior in the beta -- it was incorrect.
> According to DOM L2 the value of the parameter tagname is:
> [[
> The name of the tag to match on. The special value "*" matches all tags.
> ]]
>
> I could see that the functionality you're looking for could be useful,
> but this is not how the function is supposed to work.
>
>
> Thank you!
> --
> Elena Litani / IBM Toronto
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: wildcards

Posted by Elena Litani <el...@ca.ibm.com>.
Hi Dave, 

"Dave Yuill [thalez]" wrote:
> I used to use '*' wildcards to get all of the wanted children at once and in
> order, and now it doesn't seem to work anymore.
> 
> doc.getElementsByTagName("data*");
> 
> ..used to return all 'data' and 'dataMORE' elements.  Now it returns none...

If you got this behavior in the beta -- it was incorrect.
According to DOM L2 the value of the parameter tagname is:
[[
The name of the tag to match on. The special value "*" matches all tags.
]]

I could see that the functionality you're looking for could be useful,
but this is not how the function is supposed to work.


Thank you!
-- 
Elena Litani / IBM Toronto

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org