PHP Classes
elePHPant
Icontem

HTML forms from XML document with PHP: I need to parse XML document using PHP parse functions

Recommend this page to a friend!
  All requests RSS feed  >  HTML forms from XML document with PHP  >  Request new recommendation  >  A request is featured when there is no good recommended package on the site when it is posted. Featured requests  >  No recommendations No recommendations  

HTML forms from XML document with PHP

Edit

Picture of Karlis by Karlis - 6 days ago (2016-05-19)

I need to parse XML document using PHP parse functions

This request is clear and relevant.
This request is not clear or is not relevant.

+1

I need to parse XML document using PHP parse functions and create HTML form from it.

  • 1 Clarification request
  • 1. Picture of Manuel Lemos by Manuel Lemos - Yesterday (2016-05-23) Reply

    What kind of XML document is that? Can you show a sample?

    • 2. Picture of Karlis by Karlis - Yesterday (2016-05-23) in reply to comment 1 by Manuel Lemos Comment

      <?xml version="1.0" encoding="UTF-8"?> <forms>

      <form>
      	<name>test</name>
      	<field>
      		<name>Field1</name>
      		<text>First field</text>
      		<value>Default value 1</value>
      		<size />
      	</field>
      	<field>
      		<name>Field2</name>
      		<text>Another field</text>
      		<value>Its value</value>
      		<size>50</size>
      	</field>
      	<field>
      		<name>check1a</name>
      		<type>Checkbox</type>
      		<text>A check box a</text>
      		<value>1</value>
      		<checked>1</checked>
      	</field>
      </form>
      <form>
      	<name>form two</name>
      	<field>
      		<name>TwoField1</name>
      		<text>Two field</text>
      		<value>Two Default value 1</value>
      	</field>
      	<field>
      		<name>TwoField2</name>
      		<text>Two Another field</text>
      		<value>Two Its value</value>
      		<size>20</size>
      	</field>
      	<field>
      		<name>ta1</name>
      		<id>ta1</id>
      		<type>textarea</type>
      		<rows>15</rows>
      		<cols>60</cols>
      		<value>This is a text area</value>
      		<text>Notes&lt;br&gt;</text>
      	</field>
      	<field>
      		<name>radio1</name>
      		<type>radio</type>
      		<text>Box 1</text>
      		<value>1</value>
      		<checked>1</checked>
      	</field>
      	<field>
      		<name>radio1</name>
      		<text>Box 2</text>
      		<type>radio</type>
      		<value>2</value>
      	</field>
      	<field>
      		<name>check1</name>
      		<type>Checkbox</type>
      		<text>A check box</text>
      		<value>1</value>
      	</field>
      </form>
      

      </forms>

    • 3. Picture of Manuel Lemos by Manuel Lemos - Yesterday (2016-05-23) in reply to comment 2 by Karlis Comment

      I have a package to parse XML documents easily and another to generate and validate forms. If that is what you want I can suggest that you use them together. Just let me know.

    • 4. Picture of Karlis by Karlis - Yesterday (2016-05-24) in reply to comment 3 by Manuel Lemos Comment

      I just need to generate and validate forms from XML document.

    • 5. Picture of Karlis by Karlis - 13 hours ago (2016-05-24) in reply to comment 4 by Karlis Comment

      Last time I create a web page where I insert xml and as a result is generated html form. That time it was xslt tranformations.

      Could You make it like web page where I can insert that xml structure and from it will generates html form?

Ask clarification

1 Recommendation

Generic XML parser class: Arbitrary XML parser.

This recommendation solves the problem.
This recommendation does not solve the problem.

0

Picture of Manuel Lemos by Manuel Lemos package author package author Reputation 13905 - 15 hours ago (2016-05-24) Comment

This class that parse arbitrary XML documents and returns a structured array that would be easy to process and generate forms with the PHP forms generation and validation class. Using both classes together you have a solution for your problem.

  • 1 Comment
  • 1. Picture of Manuel Lemos by Manuel Lemos package author package author - 15 hours ago (2016-05-24) Reply

    There is a tutorial article here explaining how to use the XML parser class to parse a XML document with a single call.


Recommend package
: 
: