Are you saying speed? Or ease of programming?
Personally I like the second. But I wouldn't call it TopLink, I would call
it <A> and valURL I would rename to HREF. :)
Then you could find all of the topLinks in the XML with one selector.
$("topLinks").
Either one is perfectly easy to manage with jQuery. Just treat it as if
it's html.
alert(
$("topLinks topLink[valUrl=home]").text(); //pops up SMC Home
)
Glen
On 9/25/07, Danjojo <[EMAIL PROTECTED]> wrote:
>
>
> If I am purposing to consume XML it seems logical that the XML be
> designed the best that it can FIRST before consuming with more complex
> javascript, xpath, or your flavor of the month.
>
> In that regard is what I have desinged easy to consume using jquery/
> ajax?
>
> <topNavLinks>
> <topNavLinkHome>SMC Home</topNavLinkHome>
> <topNavLinkLogin>Login</topNavLinkLogin>
> <topNavLinkTracking>Order Tracking</topNavLinkTracking>
> <topNavLinkMyParts>My Parts List</topNavLinkMyParts>
> <topNavLinkContact>Contact</topNavLinkContact>
> <topNavLinkHelp>Help</topNavLinkHelp>
> <topNavLinkAccount>Your Account</topNavLinkAccount>
> </topNavLinks>
>
> Or would I have an easier time (esspecially being more of a developer
> than a programmer) if my xml was done like this.
>
> <topNavLinks>
> <topLink valUrl=''home">SMC Home</topLink>
> <topLink valUrl=''login">Login</topLink>
> <topLink valUrl=''order">Order Tracking</topLink>
> <topLink valUrl=''parts">My Parts List</topLink>
> <topLink valUrl=''contact">Contact</topLink>
> <topLink valUrl=''help">Help</topLink>
> <topLink valUrl=''account">Your Account</topLink>
> </topNavLinks>
>
> >From a dom perspective would it be easier to process the secont xml
> example?
>
> Or would the first one be just as easy whereby you could return the
> innertext value of every child of <topNavLinks> ??
>
> Hope I am clear enough.
>
> Thank you.
>
>