Getting the name of the of the attribute of xml using xpath


hi to all m lil bit confuse as m beginner to the xml+xpath. so m sorry if i m unable to ask any kind of wrong question.


now the question is m trying to accessing the name of the of the attribute of xml file using xpath and tyring to print it on the screen using php but m unable to do...


here is the xml statement for which m trying



```
    <product>
    <price currency="EUR">9.95</price>
    <productURL><http://www.example.com></productURL>
    <imageURL>[http://www.example.com/store/images/products/medium/9789033634628.jpg](/posts/bad_link/1892679?url=http%3A%2F%2Fwww.example.com%2Fstore%2Fimages%2Fproducts%2Fmedium%2F9789033634628.jpg)</imageURL>
    <description>Not Available</description>
    <categories>
    <category path="Nederlands / Religie &amp; Spiritualiteit / Religie /"></category>
    </categories>
    </product>

```

as i want to print out the following attribute name:  
`Nederlands / Religie &amp; Spiritualiteit / Religie /`  

for the other information i have done the job but for accessing the category m unable to do so...plz help out me to access the category name.  

following is my work done for accessing the mentioned category.



```
$cat = $xml->xpath("/product[1]/categories/category");
foreach($cat as $category)
    {
        echo 'Category:';
        echo $category.'<br/>';

    }

```
In your example, the category data is stored in an attribute, rather than within the node itself.


You therefore need to use the XPath: `/product[1]/categories/category/@path` where the @ shows you want to target an attribute.
For a long time HtmlAgilityPack [didn't had the ability to directly query an attribute value](http://htmlagilitypack.codeplex.com/Thread/View.aspx?ThreadId=1720). You had to loop over the list of meta nodes. Here's one way - 



```
var doc = new HtmlDocument();
doc.LoadHtml(htmlString);

var list = doc.DocumentNode.SelectNodes("//meta"); 
foreach (var node in list)
{
    string content = node.GetAttributeValue("content", "");
}

```

But looks like in there is an [experimental xpath release](http://htmlagilitypack.codeplex.com/releases/view/46681) that will let you do that. 



```
doc.Document.SelectNodes("//meta/@content") 

```

will return a list of HtmlAttribute objects. thanks for your comment!

i definitely should’ve used mkshell, not sure why i wasn’t. it does seem to produce a different error:

make: entering directory '/build/source/doc/manual'

xsltproc --nonet --param section.autolabel 1 --param section.label.includes.component.label 1 --param html.stylesheet … ok i got it,

'categories' => get\_the\_term\_list($post->id, 'portfolio\_categories'),

maybe that will be useful for somebody in the future. dear [@supu123](/u/supu123) ,

look in the uipath explorer the selector for multiple times and observe keenly whether the title changes or not

if the title is changing then

replace title- 'delhi high court - "’ or just ""

also look at your case number variable that you are fetching is it the exact name as it … Try this link to get help;  
  
http://www.fossil.co.uk/webapp/wcs/stores/servlet/ContentView?langId=10&storeId=32553&catalogId=20002&page=instructions  
  
Rate, please. [image] bryan:

you will need to hunt through the page and find the raw html dom object.

thank you. but i guess, it’s impossible to open select widget.

callback = customjs(args=dict(select\_=select),code="""

var el = document.getelementsbyname(select\_.name)[0];

… [@aritra](/c/user/viewprofilepage/user-id/717011) 

1. Go to Online Store->Theme->Edit code  
2. Asset->/theme.scss.liquid->paste below code at the bottom of the file.


```
.template-product .wrapper {
    max-width: 1600px;
}
```
 



 Thanks,  
Ittanta Technologies Pvt. Ltd. | Shopify Expert  
If reply is helpful, please **Like and Accept Solution.**  
To hire us, contact us at **info@ittanta.com** hi chris, 
if you use relations api, you may set properties field in your query. in this field you should set the names of the properties which values must be retrieved from the server. the argument should be a string in the following format: "propertyname1, propertyname2, , , propertynamen" , wher… Since this is an older post, I'm assuming you've solved this issue. Incase others find this post, I'll post the link to the documentation below


 


[https://experienceleague.adobe.com/docs/analytics/components/classifications/c-sub-classifications.h...](https://experienceleague.adobe.com/docs/analytics/components/classifications/c-sub-classifications.html?lang=en#classifications)




[View solution in original post](/t5/adobe-analytics-questions/how-can-i-get-classifications-to-output-correctly-to-the-new/m-p/397907#M27359) hi [@ecarmona](/u/ecarmona),

thanks for your question, this is definitely something that can be improved in the documentation.

in this context name is not referring to a specific field in the saved object, it's referring to the value of the name property of the reference itself. the reason for this is that the i…