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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T14:27:52+00:00 2026-06-16T14:27:52+00:00

I am making this request: http://en.wikipedia.org/w/api.php?format=xml&action=query&titles=self-administration&prop=revisions&rvprop=content&rvparse=&rvsection=0 My goal is to get the plain-text from

  • 0

I am making this request:

http://en.wikipedia.org/w/api.php?format=xml&action=query&titles=self-administration&prop=revisions&rvprop=content&rvparse=&rvsection=0

My goal is to get the plain-text from the intro of an article.

It gives me back some HTML in a XML file. After strip_tags and preg_replace, to remove references, I get this:

Self-administration is, in its medical sense, the process of a subject
administering a pharmacological substance to him-, her-, or itself.
[…] Cite error: There are tags on this page, but the
references will not show without a {{Reflist}} template or a
tag; see the help page.

I want to remove

Cite error: There are tags on this page, but the
references will not show without a {{Reflist}} template or a
tag; see the help page.

How can I get ride of that either with php (preg_replace?) or in my initial query (ignoring errors?).

  • 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-16T14:27:53+00:00Added an answer on June 16, 2026 at 2:27 pm
    $bad = ' <br /><strong class="error">Cite error: There are <code>&lt;ref&gt;</code> tags on this page, but the references will not show without a <code>&#123;&#123;Reflist&#125;&#125;</code> template or a <code>&lt;references /&gt;</code> tag; see the <a href="/wiki/Help:Cite_errors/Cite_error_refs_without_references" title="Help:Cite errors/Cite error refs without references">help page</a>.</strong> ';
    
    $good = str_replace($bad, '', $intro);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am on Javascript/Node.js and when I'm making a HTTP request with this query
I'm making a http get request like this: try { HttpClient client = new
I am getting this sort of CSV data while making Http request to the
I'm creating an application that's making a http request to a XML site. I'm
I have a PHP page that gets its content by making an HTTP request
I am making a url like this url = new URL(http,localhost,9080,/path/to/my/resource/myAction.action); instead of making
I'm making a simple URL request with code like this: URL url = new
I just ran into this issue while making a GET request to a node.js
We're making this web app in PHP and when working in the reports we
I'm making an ajax request and I have some problems, this is my jquery

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.