![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 4 Pomógł: 0 Dołączył: 13.07.2019 Ostrzeżenie: (0%) ![]() ![]() |
Witam.
Mam taki kod w xml <size> <stock id="0" quantity="0.000"/> <stock id="1" quantity="34" location_id="40" location_text_id="Magazyn główny\13L"/> <stock id="2" quantity="2"/> </size> Mam problem z pobraniem danych quantity w przypadku jeżeli w tagu stock id="1". Czyli chciałbym wyciągnąć wartość 34 z quantity. Próbowałem w ten sposób /sizes/size/stock[@id="1"][quantity] ale nic z tego. co należy wpisać po [@id="1"] aby pobrało wartość quantity. |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 6 807 Pomógł: 1828 Dołączył: 11.03.2014 Ostrzeżenie: (0%) ![]() ![]() |
Kod //sizes/size/stock[@id="1"] ->getAttribute('quantity'); http://forum.php.pl/index.php?s=&showt...t&p=1243305 https://kawalekkodu.pl/the-tag-is-out-there...domxpath-s01e01 https://kawalekkodu.pl/the-tag-is-out-there...domxpath-s01e02 https://kawalekkodu.pl/the-tag-is-out-there...domxpath-s01e03 https://kawalekkodu.pl/the-tag-is-out-there...domxpath-s01e04 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 8.10.2025 - 16:53 |