PHP, XML Get a records nodes and values and put them in a JSON Array?

  • Thread starter Thread starter g
  • Start date Start date

g

New Member
How do i get all child notes from the record which includes Product = Product1And put them into a JSON array ?\[code\]<RECORD><PROP NAME="Product"><PVAL><!CDATA[Produkt1]]</PVAL><PROP NAME="Value"><PVAL><!CDATA[10]]</PVAL><PROP NAME="Status"><PVAL><!CDATA[Active]]</PVAL></RECORD><RECORD><PROP NAME="Product"><PVAL><!CDATA[Produkt2]]</PVAL><PROP NAME="Value"><PVAL><!CDATA[20]]</PVAL><PROP NAME="Status"><PVAL><!CDATA[Active]]</PVAL></RECORD><RECORD><PROP NAME="Product"><PVAL><!CDATA[Produkt3]]</PVAL><PROP NAME="Value"><PVAL><!CDATA[30]]</PVAL><PROP NAME="Status"><PVAL><!CDATA[Active]]</PVAL></RECORD>\[/code\]I need the data for an iPad App, calling something like www.products.com/product.php?Product1Having the JSON look something like\[code\]{ "Product": [ { "Name":"Product1" , "Value":"10" , "Status":"Active" } ] }\[/code\]
 
Back
Top