Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8855415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:07:47+00:00 2026-06-14T14:07:47+00:00

Here is my sample XML for an XML document that consists of metadata about

  • 0

Here is my sample XML for an XML document that consists of metadata about print templates:

<TemplateList>
    <PaperSizeTemplates PaperSize="8.5x14">
        <Template>Letter ANSI A Landscape</Template>
        <Template>Letter ANSI A Portrait</Template>
    </PaperSizeTemplates>
    <PaperSizeTemplates PaperSize="A3_11.5x16">
        <Template>A3 Landscape</Template>
        <Template>A3 Portrait</Template>
    </PaperSizeTemplates>
    <PaperSizeTemplates PaperSize="A4_8.5x11">
        <Template>A4 Portrait Custom</Template>
        <Template>A4 Portrait Custom1</Template>
        <Template>A4 Portrait Custom2</Template>
    </PaperSizeTemplates>
</TemplateList>

I have a spark DropDownList whose dataProvider I want to set such that the PaperSize attribute values for all PaperSizeTemplates elements display in the DropDownList.

For example, for the XML shown above, I want my DropDownList to display the following:

8.5x14
A3_11.5x16
A4_8.5x11

I tried the following:

<s:DropDownList id="paperSizeDDL" dataProvider="{_layoutTemplatesXML.paperSizeTemplates.paperSize as XMLListCollection}" />

but nothing appears in the drop down list.

Help on this would be greatly appreciated.

Please provide the correct way to do this using data binding and my example XML.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T14:07:49+00:00Added an answer on June 14, 2026 at 2:07 pm

    The other answers are somewhat on the mark, but won’t work. Note that @Mike Petty’s comment about matching the case in your e4x statements to the case used in the XML is one part of the problem.

    However, the other issue is that e4x statements return XMLList objects. They don’t return an XMLListCollection. So this expression evaluates to null:

    _layoutTemplatesXML.PaperSizeTemplates as XMLListCollection
    

    Instead, set the data provider for the drop down list like this:

    <s:DropDownList dataProvider="{new XMLListCollection(_layoutTemplatesXML.PaperSizeTemplates.@PaperSize)}"/>
    

    This populates the drop down list with 3 XML objects who’s values are Strings for each size.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my sample code: from xml.dom.minidom import * def make_xml(): doc = Document()
Here is my address.xml <?xml version=1.0 ?> <!--Sample XML document --> <AddressBook> <Addressentry> <firstName>jack</firstName>
Consider this simple XML document. The serialized XML shown here is the result of
VS2008, .NET Framework 3.5 We're utilizing the WebEx Xml API. Here's a sample Xml
Here is the sample code that I ran on Visual Studio 2010: #include <iostream>
I have an XML document that has a collection of objects. Each object has
Here's a sample of some oddness: #!/usr/bin/ruby require 'rubygems' require 'open-uri' require 'nokogiri' print
Here is a piece of XML document: <book category=WEB> <title lang=en>XQuery Kick Start</title> <author>James
I have an XML document that is pretty much structured like an Excel spreadsheet
New to XML. I have a 3rd party webservice that supplies an XML document

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.