Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
XMLDocument vs SDK Document objects
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Tudor Holton  
View profile  
 More options Sep 21 2011, 2:46 pm
From: Tudor Holton <tu...@tudorholton.com>
Date: Wed, 21 Sep 2011 11:46:43 -0700 (PDT)
Local: Wed, Sep 21 2011 2:46 pm
Subject: XMLDocument vs SDK Document objects
Hey,

So just having chatted with ilinsky on IRC about XMLDocument vs SDK
Document objects, and I was wondering why these objects are separate
at the SDK level?

I understand that XMLDocument objects are created at the browser
level, but I fail to see why, having done all this abstraction, we
can't then do a simple convert for the user of the SDK and therefore
unify them?

For example, currently if I'm doing a straight client side xsl
transformation from two server-side xml files, I have to:

1) Convert the SDK Document to an XMLDocument with DOMParser so it's
compatible with XSLTProcessor.transformToDocument(XMLDocument)
2) Convert the resulting XMLDocument back to an SDK Document with
ample.importNode(XMLDocument.documentElement) in order to play with
the Document in ample.  (e.g. Query.append(Document))

Is there something that XMLDocuments offer that SDK Documents don't?

If not, I propose a couple of options to make this simpler for the
user:
a) Bury the XSLTProcessor (and DOMParser for that matter) and create a
wrapper object that mimics it exactly with the same parameters but
with 'Document' in place of 'XMLDocument'; or
b) Add methods for transformation and parsing into the ample object;
or
c) Allow any ample method that uses an SDK DOM object to also allow an
equivalent XMLDOM object.  (Although what we'd do in the case of
return values would be very messy.)

What do you think?

Cheers,
Tudor.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »