GRML -> Articles -> GRML ->

Using GRML - Examples

Read the introduction to Using GRML.

GRML Examples.

There is more than one way to organize tags to create input controls, columns, and results. This allows a file or web page to organize its content in many different ways. The following two sections demonstrate these alternatives.

Form tag examples.

The form tags create input controls. Below are two examples for creating input controls in different ways.

Example 1.

<edit search1>
	<Title>Request:
	<bgtext>Enter URL here
</edit>

<Combo Default>
	<Title>Default location
	<monster>monster
</combo>

<submit>
	<location>GRMLBrowser.com/jobs.asp
	<text>Submit
</submit>


Example 2.

<edit search1>
	<Title>Request:
</edit>

<edit search1>
	<bgtext>Enter URL here
</edit>

<Combo Default>
	<Title>Default location
</combo>

<Combo Default>
	<monster>monster
</combo>

<submit>
	<location>GRMLBrowser.com/jobs.asp
</submit>

<submit>
	<text>Submit
</submit>


The controls, created in Example 1, set all attribute values, in one parent tag, for each control. In Example 2, there is only one attribute set, for each parent tag. Both examples create the same input controls, though the tags are organized differently.

View tag examples.

View tags create columns and results.

Columns.

Use the column tag to set the column order of results. Below are two examples.

Example 1.

<column>
	<Date Posted>
	<Job Title>
	<Job Location>
	<Company>
	<Search>
	<DateTime>
	<Link>
</column>


Example 2.

<column>
	<Date Posted>
	<Job Title>
	<Job Location>
	<Company>
	<Search>
</column>
<column>
	<DateTime>
	<Link>
</column>


Example 1 has all attributes using one column parent tag. Example 2 splits the attributes in two, each using a column parent tag. Both examples create the same column order.

Results.

Having created columns, the next step is to add results. This requires the result parent tag. Below are two examples for adding results to the above column order.

Example 1.

<result>
	<Date Posted>Jul 28
	<Job Title>Sr. Java Software Engineer
	<Job Location>US-CA-La Jolla
	<Company>Company A
	<Search>Java LA
	<DateTime>Today
	<link>http://127.0.0.1
	
	<Date Posted>Jul 20
	<Job Title>Web Development Analyst
	<Job Location>US-WI-La Crosse
	<Company>Company B
	<Search>Java LA
	<DateTime>Today
	<link>http://127.0.0.1

	<Date Posted>Aug 2
	<Job Title>Software Group Manager
	<Job Location>US-CA-La Mirada
	<Company>Company C
	<Search>Java LA
	<DateTime>Today
	<link>http://127.0.0.1
</result>


Example 2.

<result>
	<Date Posted>Jul 28
	<Job Title>Sr. Java Software Engineer
	<Job Location>US-CA-La Jolla
	<Company>Company A
	<Search>Java LA
	<DateTime>Today
	<link>http://127.0.0.1
</result>

<result>
	<Date Posted>Jul 20
	<Job Title>Web Development Analyst
	<Job Location>US-WI-La Crosse
	<Company>Company B
	<Search>Java LA
	<DateTime>Today
	<link>http://127.0.0.1
</result>

<result>
	<Date Posted>Aug 2
	<Job Title>Software Group Manager
	<Job Location>US-CA-La Mirada
	<Company>Company C
	<Search>Java LA
	<DateTime>Today
	<link>http://127.0.0.1
</result>


Example 1 has all results using one result parent tag. Example 2 splits the attributes using multiple result parent tags. Both examples create the same results.

Next, learn how to put this all together.

Revision History.

07/11/05. Created this web page from Using GRML.
01/08/05. Updated formatting.
10/26/04. Removed almost all references to Pioneer Report MDI.
10/26/04. Added article text to cover GRML tags.
10/26/04. Updated examples from GRML 1.2 to GRML 2.0.
08/30/04. First published.


Copyright © 2002-2010 grmlbrowser.com. All Rights Reserved. Privacy Policy | Slimming aids

free pics images | LCD vs Plasma | lamp projection TV | good credit score | Lawn Mower Parts

Photo Recovery Mac | 32 inch LCD TV | Recover Data | Recover Deleted Files | best web hosting