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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:33:33+00:00 2026-06-14T00:33:33+00:00

This is my xml ouput which i m working <adamContent projectTypeID=10 genContentID=000002> <metaData> <keywordList>

  • 0

This is my xml ouput which i m working

   <adamContent projectTypeID="10" genContentID="000002">
        <metaData>
            <keywordList>
                      <keyword>
                            <word>#27</word>
                            <relevancy>120</relevancy>
                      </keyword>
                      <keyword>
                            <word>#43</word>
                            <relevancy>114</relevancy>
                      </keyword>
             </keywordList>
            <taxonomy type="CPT">
               <code>99374</code>
            </taxonomy>
        </metaData>
         <textContent title="Description" ordinal="0" group="0">
             <p>An in-depth report on the causes, diagnosis, and treatment of Alzheimer's disease.</p>
        </textContent>
</adamContent>

and i need output like that(i want to remove whole metaData node)

<adamContent projectTypeID="10" genContentID="000002">
         <textContent title="Description" ordinal="0" group="0">
             <p>An in-depth report on the causes, diagnosis, and treatment of Alzheimer's disease.</p>
        </textContent>
</adamContent>

this is my php code wht i try so far

<?php
$xmldoc = new DOMDocument();
$atvID =   $xmldoc->load('000002.xml', LIBXML_NOBLANKS);
foreach($atvID as $id){
    $delnode = $xmldoc->getElementsByTagName('metaData');
    $xmldoc->firstChild->removeChild($delnode->item($id));
}
$xmldoc->save('000002.xml');
 ?>
  • 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-14T00:33:34+00:00Added an answer on June 14, 2026 at 12:33 am
    $xmldoc = new DOMDocument();
    $xmldoc->load('000002.xml');
    $metadatas = $xmldoc->getElementsByTagName('metaData');
    foreach ($metadatas as $metadata) {
        $metadata->parentNode->removeChild($metadata);
    }
    $xmldoc->save('000002.xml');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working with an XML list at the moment, which looks like this:
I am trying to learn xslt and i am working an xml which looks
I am working on a Perl script which needs to populate an XML file
I've been working to build a custom build task which reads xml files, and
I need to generate an xml for a feed which looks roughly like this
I'm working with an xml file like this. <Envelope xmlns=http://schemas.xmlsoap.org/soap/envelope/> <Body> <Element1> <Element2 day=2009-10-18>
I am working with big and complex dictionary data (XML) which needs to be
This is the xml I got as an output from the WriteXmlString() of Infragistics
This command and output: % find . -name file.xml 2> /dev/null ./a/d/file.xml % So
This is my input xml: <root> <node1/> <node2/> <node3/> <node4/> <othertags/> </root> The output

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.