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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:15:44+00:00 2026-06-10T12:15:44+00:00

<ContentFragment><![CDATA[<a target=_blank href=$click_tracking_url$&landing_url=https://www.foo.com><img src=’urltoimage.jpg’ border=’0′ alt=” /></a>]]></ContentFragment> I have this xml segment of a

  • 0
 <ContentFragment><![CDATA[<a target=_blank href=$click_tracking_url$&landing_url=https://www.foo.com><img src='urltoimage.jpg' border='0' alt='' /></a>]]></ContentFragment>

I have this xml segment of a file which i have access to ContentFragment via JAXB. and ContentFragment is a string.

I want to find out how can i capture if the a href is targeted for new window as well as if a click tracking url is there or not.

As far as what i have done, I can do a string.contains("_blank"); or string.contains("click_tracking_url"); then i can parse.

is there a better way to do it such as parsing a href into parts?

  • 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-10T12:15:45+00:00Added an answer on June 10, 2026 at 12:15 pm

    There are great Java libraries for parsing XML…

    … and there are great Java libraries for parsing HTML …

    … but for simply parsing out an “href” inside an <a> tag inside [CDATA] element:

    String.contains() and String.indexOf() should be more than sufficient.

    IMHO…

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

Sidebar

Related Questions

When I run this script on the second content fragment below, it passes (I
My website is setup like: when the page loads, a jQuery animation -- in
Here is an android programming question. I follow the offical example and write an
I'm putting together some demo pages, and one of the things I want to
I have the following test defined in a psake build script: task package -depends
I have implement FragmentPagerAdapter in my app but it show only a same list
I'm currently testing my app with a multipane Fragment -ised view using the HC
I am developing Galaxy Tab 10.1 app by using honeycomb 3.1 and i have
Our current site is broken down into various easy to work with PHP includes
Im sure this question is pretty basic but im new. Now I have a

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.