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

  • SEARCH
  • Home
  • 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 520309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:07:54+00:00 2026-05-13T08:07:54+00:00

There are dashes in attributes of an xml, and I don’t know how to

  • 0

There are dashes in attributes of an xml, and I don’t know how to filter them:
Here you can see a simple example of the xml:

<posts>
 <post>
     <photo-url max-width="1280">http://blabla.tumblr.com/photo/98</photo-url>
 </post>
</posts>

Because also the photo-url-tag has a dash, I needed to parse it with …child(“photo-url”).
This worked fine, but if I want to filter these tags(photo-url), in order to receive all photo-url’s with the same attribute: “max-widht=’1280′”, I couldn’t manage to do so.
I tried this approach:

var photoUrl:XMLList = xml.posts.post.child("photo-url").(@max-width==1280);

I get this error:

ReferenceError: Error #1065: Variable @max is not defined.

Thx

  • 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-05-13T08:07:55+00:00Added an answer on May 13, 2026 at 8:07 am

    I don’t think you can do it directly. instead of try using for..each..in.

    var photoUrls:XMLList = xml.posts.post.child("photo-url");
    for each (var child in photoUrls) {
      if (child.attribute("max_width") == "1280");
        trace(child);
    }
    

    .

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

Sidebar

Related Questions

Is there a way to generate xml tags with dashes in builer? Imagine I
Need to xpath xml data based on greater than date attribute. The dashes in
I have various text fields and sometimes their values have hypens/dashes in them, e.g.
For example, in Sass I'm using dashes for variable names, and I have a
Possible Duplicate: Why are dashes preferred for CSS selectors / HTML attributes? Personally I
So does anyone know if there is an mso-number-format to mimic the Accounting format
I have an XML document that contains items with dashes I'd like to strip
I know how to strip out extra spaces, dashes, and periods using preg_replace(), but
Is there a way of simplifying this loop where i replaces whitespace with dashes
Is there any string manipulation in python that can achieves the following input and

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.