Thanks for the info. I just wanted to find out if there are ready-made classes to do this functionality. It seems like there are none.
On Mar 9, 11:49 am, Vitali Lovich <[email protected]> wrote: > I'm confused - why don't you just use a regular String (or StringBuffer - > does GWT have StringBuilder? I can't regular)? If you want something that > validates or parses the HTML for you, then you're SOL unless you find a > javascript parser of HTML or write your own. My recommendation for that > would instead to just pass that to the server to process. > > If you do want to try to do parsing with the client's browser, you could try > is create the HTML widget, get its underlying element & see if the tree > structure is actually created (try also adding the HTML widget onto your > page first (as a non-visible widget)). Another thing you could try is to > also load it into an invisible IFRAME, & then get the DOM for that IFRAME. > I'm not sure if you could do it all in GWT though - I think you'll have to > drop into javascript to accomplish the latter. > > On Mon, Mar 9, 2009 at 1:19 PM, planetsoni <[email protected]> wrote: > > > Yes, but I want something which does not carry UI. I really don't > > need UI. All I need is something that represents the arbitrary html > > string model. It will be plus if this class also supports method of > > manipulating the underlying string. > > > On Mar 7, 9:11 pm, Vitali Lovich <[email protected]> wrote: > > > Do you mean to inject arbitrary HTML text into the page? There's the > > HTML > > > widget class (don't feel like looking up the full package name right now, > > > but Eclipse should help you find it - it's in the com.google.client UI > > > stuff). > > > > On Fri, Mar 6, 2009 at 7:13 PM, planetsoni <[email protected]> > > wrote: > > > > > On the same topic. > > > > Is there any class that does similar things for html(instead of URL)? > > > > > What I mean is a class that represent arbitrary HTML element text. > > > > (Pretty much like DOM Element object that has public constructor.) > > > > > Thanks. > > > > > On Mar 6, 12:38 pm, Lothar Kimmeringer <[email protected]> wrote: > > > > > planetsoni schrieb: > > > > > > > So here is the whole thing: > > > > > > In the client code in GWT, I am referencing some URLs for different > > > > > > server. I don't want to use string literals to reference these > > > > > > links. I rather have a class that enclose each URL link. It is > > just > > > > > > good programming practice. > > > > > > Sure but something like java.net.URL doesn't exist with the current > > > > > versions of GWT, so you have something to create for yourself or > > > > > find workarounds (like the one I described). > > > > > > On the other side, it shouldn't be hard to extract the parsing part > > > > > from the sources of java.net.URL (its GPLed now) and put it into > > > > > an own class that is shared between server and client of your > > > > > GWT-application. > > > > > > Regards, Lothar > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
