What is the best workaround to select?  I can hardcode the "Id".

Is there an xpath expression or something that is the best performing
way to pick out a node by an "Id"?

-Tom

On Mon, 15 Jul 2002, James Strachan wrote:

> Date: Mon, 15 Jul 2002 18:39:41 +0100
> From: James Strachan <[EMAIL PROTECTED]>
> To: Tom Oehser <[EMAIL PROTECTED]>, Thomas Nichols <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Re: [dom4j-user] elementByID problems
>
> Right now dom4j doesn't notice the attribute types when parsing XML with a
> DTD so cannot find the ID attributes properly.
>
> James
> ----- Original Message -----
> From: "Tom Oehser" <[EMAIL PROTECTED]>
> To: "Thomas Nichols" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Monday, July 15, 2002 6:33 PM
> Subject: Re: [dom4j-user] elementByID problems
>
>
> >
> > Note, they do have stuff in the DTD like:
> >
> > <!ENTITY % iid " Id ID  #IMPLIED">
> > and
> > <!ENTITY % rid " Id ID  #REQUIRED">
> >
> > Maybe w3c-dom works with this and dom4j doesn't?
> >
> > -Tom
> >
> > On Mon, 15 Jul 2002, Tom Oehser wrote:
> >
> > > Date: Mon, 15 Jul 2002 13:26:44 -0400 (EDT)
> > > From: Tom Oehser <[EMAIL PROTECTED]>
> > > To: Thomas Nichols <[EMAIL PROTECTED]>
> > > Cc: [EMAIL PROTECTED]
> > > Subject: Re: [dom4j-user] elementByID problems
> > >
> > >
> > > They use "Id".  -Tom
> > >
> > > On Mon, 15 Jul 2002, Thomas Nichols wrote:
> > >
> > > > Date: Mon, 15 Jul 2002 17:11:34 +0100
> > > > From: Thomas Nichols <[EMAIL PROTECTED]>
> > > > To: Tom Oehser <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> > > > Subject: Re: [dom4j-user] elementByID problems
> > > >
> > > > Are you using an "ID" attribute, or "id"? From memory, at one stage
> dom4j
> > > > did not process the latter.
> > > >          - Thomas.
> > > >
> > > > At 10:59 15/07/2002 -0400, Tom Oehser wrote:
> > > >
> > > > >Hi,
> > > > >
> > > > >I am converting existing w3c-dom stuff to dom4j.
> > > > >
> > > > >In the w3c stuff, there is code using "getElementById()".
> > > > >
> > > > >When I parse into dom4j, both "elementByID()" and the
> > > > >"getElementById()" of DOMs from DOMWriter give null.
> > > > >
> > > > >The documentation says something about the tree not
> > > > >being capable of knowing what attribute to use- but
> > > > >I can't figure out what is necessary to make it work,
> > > > >or, best, make the DOM from DOMWriter work, the way
> > > > >the existing DOM code works...
> > > > >
> > > > >
> > > > >-Tom
> > > > >
> > > > >
> > > > >
> > > > >-------------------------------------------------------
> > > > >This sf.net email is sponsored by:ThinkGeek
> > > > >Welcome to geek heaven.
> > > > >http://thinkgeek.com/sf
> > > > >_______________________________________________
> > > > >dom4j-user mailing list
> > > > >[EMAIL PROTECTED]
> > > > >https://lists.sourceforge.net/lists/listinfo/dom4j-user
> > > >
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This sf.net email is sponsored by:ThinkGeek
> > > Welcome to geek heaven.
> > > http://thinkgeek.com/sf
> > > _______________________________________________
> > > dom4j-user mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/dom4j-user
> > >
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > dom4j-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/dom4j-user
> >
>
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.comm
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> dom4j-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dom4j-user
>



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to