0

I am trying to make a primitive form of meta-search and i thought that it would require xml parsing.

I have managed to write code for the parser to display the name of all attributes in certain xml tags, but what i am looking for is how to display the elements of a certain attribute's name.

So i want it to only, &ltdiv id="search"&gt search &lt/div&gt display the elements with the attribute value of 'search'.

J. Scott Elblein
  • 4,013
  • 15
  • 58
  • 94
  • 2
    It would be easier to provide a segment of the XML, what your code is so far and where you are having problems rather than just trying to describe the issue. – Nigel Ren Jan 25 '20 at 15:14
  • items->item as $item) { echo "Attribute: " . $item->book->attributes()->category . "n echo "Value: " . $item->book . "nn"; } ?> this is the code i am using, what i want it to do is display all tag with a certain attribute value – Web Master Jan 25 '20 at 15:17
  • i am testing it on the website repl.it and the url for it is: https://repl.it/@venhubtech/MetaSearch-Yahoo-Google-Bing – Web Master Jan 25 '20 at 15:22
  • Please [edit the question](https://stackoverflow.com/posts/59910531/edit) to include all necessary information (including your code since it's unreadable in comments). – M. Eriksson Jan 25 '20 at 15:41
  • Added code formatting + removed irrelevant references to websites. – J. Scott Elblein Jan 25 '20 at 19:19

0 Answers0