View previous topic :: View next topic |
Author |
Message |
marcelo Contributor
Joined: 10 May 2008 Posts: 149
|
Posted: Mon Dec 16, 2024 4:09 pm Post subject: Help with XMLDOC |
|
|
Hello. I would like to know a little more about the XMLDOC function, since every time I have to work with an XML I have to open it as a text and treat it manually.
I am attaching a very simple XML example and I would like to be able to obtain the value of "release-list count", which in this case is "1".
Code: |
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://musicbrainz.org/ns/mmd-2.0#">
<release-list count="1">
</release-list>
</metadata>
|
I have tried several options without success
Code: |
%%Count = @xmldoc(value,%%myXML, metadata/release-list/count)
%%Count = @xmldoc(value,%%myXML, metadata/release-list/@count)
%%Count = @xmldoc(value,%%myXML, metadata/release-list count)
|
Any help? |
|
Back to top |
|
|
marcelo Contributor
Joined: 10 May 2008 Posts: 149
|
Posted: Mon Dec 16, 2024 10:28 pm Post subject: |
|
|
I think it's solved and the correct way is:
Code: |
@XMLDOC(VALUES, %%myXML, "/metadata/release-list","@count")
|
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|