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 8201173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:43:02+00:00 2026-06-07T06:43:02+00:00

I parse an XML and use different elements from the xml to build some

  • 0

I parse an XML and use different elements from the xml to build some HTML code that I can then show in a UIWebView. One part of the Parsed XML includes pictures with links. I would like to keep the pictures, but lose the links. Normally I could just replace all the ahref tags in the string, but I would like to keep other links not on pictures. Is there anyway I can do this in XCode to only remove the ahref tags from images?

a href="http://treymorgan.net/wp-content/uploads/2012/06/divorce.jpg" img class="alignleft size-full wp-image-4539" title="divorce" src="http://treymorgan.net/wp-content/uploads/2012/06/divorce.jpg" alt="" width="190" height="150"/ /a

  • 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-07T06:43:06+00:00Added an answer on June 7, 2026 at 6:43 am

    You should be able to do this using CSS rather than altering the link itself. Take a look at this article for a suggestion on how to achieve this:-

    http://css-tricks.com/pointer-events-current-nav/

    Update: Here’s a full working example that disables links placed around images on iOS and many desktop browsers. In your example, you should replace the <body> content with your parsed HTML snippet.

    <html>
    <head>
        <style type='text/css'>
        a > img {
            pointer-events: none;
            cursor: default;
            }
        </style>
    </head>
    <body>
        <a href='http://www.google.com'>Link to Google</a><br>
        <a href='http://www.google.com'><img src='[image_url.png]'></a>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to parse a XML String so I can use some of the
I use nokogiri(which in turn uses xpath) to parse xml file. xml has some
I am trying to use NSXMLParser to parse an XML file that looks something
I have an XML element with multiple child elements that use the same ID.
I have some code that parses an xml file using XDocument . It retrieves
I'm making an xml parser to parse xml reports from different tools, and each
When I use XmlReader to parse an XML file, I get different results depending
I have a class A that can be generated from two different ways. a
Hey, I'm trying to use VTD-XML to parse XML given to it as a
Decided to use Apache's Common Configuration package to parse an XML File. I decided

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.