Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / XML / June 2007

Tip: Looking for answers? Try searching our database.

Embedded XML datatsource for dependent ddl's

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chuck P - 27 Jun 2007 20:14 GMT
I need to put some embedded xml within a web page.  It has to be in the
webpage.

Is their a way I could use this xml as a datasource for an extended Ajax
cascading dropdown and not have postbacks (preferred) or just for some
cascading DDLs.

dropdownlist one: CarManufactures

dropdownlist two: Models

I've used ajax cascading dropdowns and xml.  However,I have no clue on how
to grab the xml from withing the webpage, filter it, and use it as a
datasource for the dropdownlists.
Martin Honnen - 28 Jun 2007 12:42 GMT
> I need to put some embedded xml within a web page.  It has to be in the
> webpage.

Embedding XML in an XHTML document is possible if parsed by an XML
parser. Browsers like Mozilla, Opera, Safari support that where you
serve your XHTML as application/xml and embed elements in a different
namespace than the XHTML namespace.

IE knows so called XML data islands where the HTML parser supports an
element named xml to insert XML inline or referenced from a document. See
<http://msdn2.microsoft.com/en-us/library/ms766512.aspx>
<http://msdn2.microsoft.com/en-us/library/ms753753.aspx>

Signature

    Martin Honnen --- MVP XML
    http://JavaScript.FAQTs.com/

Chuck P - 28 Jun 2007 14:16 GMT
I can't use IE only stuff this is on an intranet with lots of Linux and Mac
computers.
Anyway to to grab the xml from withing the webpage, filter it, and use it as a
datasource for the dropdownlists.
Martin Honnen - 28 Jun 2007 14:20 GMT
> I can't use IE only stuff this is on an intranet with lots of Linux and Mac
> computers.
> Anyway to to grab the xml from withing the webpage, filter it, and use it as a
> datasource for the dropdownlists.

If you want cross-browser stuff with a HTML document served as text/html
then in my view you can't embed the XML in the HTML document, rather you
use separate XML document and load that using XMLHttpRequest
(respectively new ActiveXObject('Msxm2.XMLHTTP.3.0') in IE 6).

Signature

    Martin Honnen --- MVP XML
    http://JavaScript.FAQTs.com/

WenYuan Wang [MSFT] - 29 Jun 2007 14:16 GMT
Hello Chuck,

I'm not sure I have understood the issue correctly.
It seems like you want to grab the embedded xml content from the web page.
Your end user is using Linux or Mac Computers. Thus, it is not possible for
you to use IE. Am I missing something?

If this is the case, in my opinion, you could use System.Web.HttpRequest to
grab the whole web page(HTML) and then exact the XML content(which you
need) by System.Text.RegularExpressions.

I could found some example on this method if you are interested in it.
Please let me know if this is what you need. Thanks.

Hope this helps
Sincerely,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.