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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:35:17+00:00 2026-05-25T20:35:17+00:00

I have a Valid XML. It asked me to treat the entire metadata record

  • 0

I have a Valid XML.

It asked me to treat the entire metadata record as the value of metadata element “dataxml”, with newlines (and percent signs) indicated by percent signs (i.e. “percent-escaped”)

so i have done the following

Note: It asked me percent only the following : \n,\r, : and % so i only str_replaced those

$input .= 'dataxml: ' . str_replace(array(chr(hexdec('3A')),chr(hexdec('25')),chr(hexdec('0A')),chr(hexdec('0D'))),array('%3A', '%25', '%0A', '%0D'), $xmlfile) . "\n";

But it pops out the following error:

400 error:'dataxml': XML parse error: xmlns: URI http%253A//dataxml.org/schema/kernel-2.1 is not absolute

Can any one point out what i have done wrong?

  • 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-25T20:35:17+00:00Added an answer on May 25, 2026 at 8:35 pm

    The colon in http:// is being replaced twice: first the colon is replaced by %3A then the percent in that replacement is being replaced by %25.

    You can use the function strtr() to avoid replacing already replaced parts of the string.

    For example,

    $input  .= 'dataxml: ' . strtr($xmlfile, array(":" => "%3A", "%" => "%25", "\n" => "%0A", "\r" => "%0D")) . "\n";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a url that contains valid xml, but unsure on how I could
I have an XML file that is well formed and valid (matched with an
I have a feeling this XML is not valid, can someone please explain why?
Suppose I have downloaded a valid XML document via Ajax (var docum = request.responseXML;).
Suppose I have downloaded a valid XML document via Ajax (var docum = request.responseXML;).
I have a file that consists of concatenated valid XML documents. I'd like to
Within a valid XML file, I have the following section: <PropertyGroup> <WorkingDir>C:\SomeFolder\</WorkingDir> </PropertyGroup> <ItemGroup>
I have a valid XML file being read by the following .NET C# windows
hi i have a confusion about xml please tell me is this valid xml
I have a variable string that contains well-formed and valid XML. I need to

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.