Skip to main content

All Questions

Tagged with
1 vote
1 answer
32 views

XPath expression for finding subsequent elements that have the same tag name

Here is a sample XML: <Body> <Subsection lims:inforce-start-date="2018-12-15" lims:fid="170842" lims:id="170842"> <MarginalNote lims:inforce-start-date=&...
Gabriel 's user avatar
0 votes
0 answers
68 views

How to Dynamically Populate Schema in WordPress Using XPath Variables?

I have Schema for post type "company" in my WordPress project, but I also have XPath variables but I don't know what to do with them. Can anyone who maybe have worked in XPath help me ...
Nuriddin Gulamov's user avatar
0 votes
0 answers
41 views

XPATH img import

I'm new to this, I want to take a image from another site, but a blank page appears. The codes I used are below, how can I fix this problem? <?php $url = "simple url"; $curl = curl_init(...
Koray Genç's user avatar
1 vote
1 answer
36 views

PHP DOMDocument ignores first table's closing tag

I was writing a tool to convert HTML tables to CSV and I noticed some bizarre behavior. Given this code $html = <<<HTML <table> <tr><td>A</td><td>Rose</td>&...
tvanc's user avatar
  • 4,195
0 votes
0 answers
66 views

PHP strip_tags doesn't allow <img> images in DOM

I'm trying to have the posts description for a Wordpress blog to show only some HTML elements including the images (img). So I have canceled the the_content() in the theme file, and replaced it with a ...
Johnny Bravo's user avatar
0 votes
1 answer
55 views

How to get all nodes in XML?

I want to get all <image_link> of an XML. I have tried like this: $reader = XMLReader::open($path); $document = new DOMDocument(); $xpath = new DOMXpath($document); while ( $reader->read() &...
Gunnarius's user avatar
  • 107
0 votes
1 answer
83 views

How to get all unique values of XML elements using PHP?

I have an XML file. $xml = simplexml_load_file('example.com'); It looks something like this: SimpleXMLElement {#1635 ▼ +"@attributes": array:1 [▶] +"shop": SimpleXMLElement {#...
Rediska's user avatar
  • 35
2 votes
3 answers
54 views

PHP Parsing XML to Get All String Values At Multiple Depths

I've got an XML like the following example: <article> <body> <title>I <underline><bold>LOVE</bold></underline> Coding</title> </body> </...
Maciek's user avatar
  • 1,912
2 votes
1 answer
140 views

How to get xml node value after registering namespace?

I am trying to get xml node value with xpath query but I am getting no results. I registered namespaces for the xml but there is no way to get the result although when I use http://xpather.com/ with ...
mohammed awni's user avatar
0 votes
1 answer
48 views

PHP SimpleXML Xpath Is Getting An Empty Array

I am trying to get information from an XML file using xpath function. For some reason, it keeps returning an empty array. XML File <?xml version="1.0" encoding="UTF-8" ...
Maciek's user avatar
  • 1,912
0 votes
1 answer
67 views

PHP SimpleXML Xpath Relative to Current Node Only

I am trying to run a simple PHP SimpleXML command using xpath. But, my //w:pStyle Xpath is getting all nodes in the entire document and not the ones relative to the node //w:p thats being looped. Note:...
Maciek's user avatar
  • 1,912
1 vote
2 answers
57 views

How to grab an HTML file with php XPath

I have the following portion of an HTML file: <span class="type">Servers:</span> <li class="server"> <span class="bullet">-</span&...
Fabio's user avatar
  • 41
0 votes
1 answer
50 views

Extract javascript generated content of certain page

I want to extract the content of the following section container: <section class="tiw-line-name " id="EU-group-holiday-line-0" data-side="both"> <a href="/...
Zerers's user avatar
  • 63
0 votes
1 answer
31 views

How to get specific value text from XML by PHP xpath

I have an xml like that : $strxml= "<products> <product> <name>Product Parent</name> <sku>3151907</sku> <parent_sku></parent_sku> <...
Jean R.'s user avatar
  • 505
1 vote
2 answers
52 views

How can I access embedded nodes using XPath with SimpleXML in php?

I'm trying to access all the text within the Text node of the following XML document: <Section> <Subsection lims:inforce-start-date="2003-07-01" lims:fid="182941" lims:id=...
Gabriel 's user avatar

15 30 50 per page
1
2 3 4 5
194