Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP] XML schema + loop
Randallmaster
post 3.11.2015, 09:35:32
Post #1





Grupa: Zarejestrowani
Postów: 677
Pomógł: 11
Dołączył: 18.11.2009

Ostrzeżenie: (0%)
-----


Witam jak wykonać pętlę w schemacie xml, na lureposition?

  1. <lures>
  2. <lure>
  3. <lureName>32</lureName>
  4. <lureCompany>123</lureCompany>
  5. <lureQuantity>2</lureQuantity>
  6. </lure>
  7. <lureposition>
  8. <lureName>32</lureName>
  9. <lureCompany>123</lureCompany>
  10. <lureQuantity>2</lureQuantity>
  11. </lureposition>
  12. <lureposition>
  13. <lureName>32</lureName>
  14. <lureCompany>123</lureCompany>
  15. <lureQuantity>2</lureQuantity>
  16. </lureposition>
  17. </lures>


Schemat ten validuje tylko lure, ale nie wiem jak zrobić pętle na lureposition
  1. <?xml version="1.0"?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  3. <xs:element name="lures">
  4. <xs:complexType>
  5. <xs:sequence>
  6. <xs:element name="lure">
  7. <xs:complexType>
  8. <xs:sequence>
  9. <xs:element name="lureName" type="xs:string"/>
  10. <xs:element name="lureCompany" type="xs:string"/>
  11. <xs:element name="lureQuantity" type="xs:integer"/>
  12. </xs:sequence>
  13. </xs:complexType>
  14. </xs:element>
  15. </xs:sequence>
  16. </xs:complexType>
  17. </xs:element>
  18. </xs:schema>


Znalazłem generator: http://xmlgrid.net/xml2xsd.html
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 05:10