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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:11:10+00:00 2026-06-02T10:11:10+00:00

Having the next XML(Idatzi.xml) : <?xml version=’1.0′ encoding=’ISO-8859-1′?> <!DOCTYPE markables SYSTEM markables.dtd> <markables> <markable

  • 0

Having the next XML(Idatzi.xml) :

<?xml version='1.0' encoding='ISO-8859-1'?>
<!DOCTYPE markables SYSTEM "markables.dtd">
<markables>
<markable id="markable_1" atrib="yes" span="word_1..word_4"> </markable>
<markable id="markable_2" atrib="no" span="word_6..word_7"> </markable>
<markable id="markable_3" atrib="yes" span="word_10..word_24"> </markable>
</markables>

And the next PHP code:

<?php

$xmlIdatziDok = new DOMDocument();
if($xmlIdatziDok->load("Idatzi.xml") === FALSE){die('Error');}
$xPath_IdatziDok = new DOMXPath($xmlIdatziDok);

foreach ($xPath_IdatziDok->query('//markables/markable') AS $Idaztekoa)
{
  $IdaztekoaID = $Idaztekoa->getAttribute('id');
  $IdaztekoaAtrib = $Idaztekoa->getAttribute('atrib');

    if($IdaztekoaAtrib != "yes")
    {
      $Idazteko->Attribute('atrib') = "yes";      
    }
}

I would like to know how to correctly write the next line of code in the PHP code:

$Idazteko->Attribute('atrib') = "yes";

It is obviously wrong written. What I would like to do is to change the “no” of markable_2 to “yes”. Any idea?

  • 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-02T10:11:12+00:00Added an answer on June 2, 2026 at 10:11 am

    You can find this information in the documentation.

    $Idaztekoa->setAttribute('atrib', 'yes');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my XML Document(Small Snippt). <?xml version=1.0 encoding=UTF-8 standalone=yes?> <w:document xmlns:w=http://schemas.openxmlformats.org/wordprocessingml/2006/main> <w:body> <w:p>
I am having some trouble with aligning two div boxes next to each other;.
I am newbie in Spring Security 3, and I am having the next problem.
I have been having problems creating a relative layout in XML for a list
I'm having a problem with looping through an XML file and storing the value
I'm having a bit of an issue. I'm parsing a large xml file using
I've been having problems writing XML and reading it in. I have a handwritten
Having some trouble with an ImageButton with a Selector.xml as the drawable source, keep
I'm having trouble when showing a button next to the search box. I'm using
I have an XML file with this structure: <?xml version=1.0> <person> <element att1=value1 att2=value2>Anonymous</element>

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.