× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I'm no expert in XML, but here are my 2 cents...

Whenever you nest a set of repeated elements inside a parent element, the parent element can be considered an array. Each repeated element is an item within the array.

So, for:

<children>
<child>
<name>Peter</name>
</child>
<child>
</name>Jill</name>
</child>
</children>

You can have an array called "children" that would contain two items: "Peter", "Jill".

Depending on the XML technology you are using, the <children> tag can be very helpful because it allows the technology to create the array for you. Some XML technologies may require you use the <children> tag because of the way those technologies work beneath the covers.

You can create an array without the <children> tag, but you may have to code and create it yourself instead of letting an XML parser or tool do it for you.

Thanks,
Kelly Cookson
Senior Programmer/Analyst
Dot Foods, Inc.
217-773-4486 x12676
www.dotfoods.com


-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of hr@xxxxxxxxxxxx
Sent: Tuesday, March 09, 2010 2:34 PM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Basic question on XML structure

Can't you see where the array is and isn't in this structure:

Lets make is visiual:

<client>
<name>bill</name>
<children>
<child>
<name>jon</name>
</child>
<child>
<name>joe</name>
</child>
<child>
<name>alex</name>
</child>
<child>
<name>peter</name>
</child>
</children>
<address>My home street</address>
</client>

<client>
<name>bill</name>
<child>
<name>jon</name>
</child>
<child>
<name>joe</name>
</child>
<address>My home street</address>
<child>
<name>alex</name>
</child>
<child>
<name>peter</name>
</child>
</client>





Jeff Crosby <jlcrosby@xxxxxxxxxxxxxxxx>
Sent by: web400-bounces@xxxxxxxxxxxx
09-03-2010 20:54
Please respond to
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>


To
"Web Enabling the AS400 / iSeries" <web400@xxxxxxxxxxxx>
cc

Subject
Re: [WEB400] Basic question on XML structure






I don't see it. I need another clue.

Or else save us all time and just tell us.


On Tue, Mar 9, 2010 at 2:52 PM, <hr@xxxxxxxxxxxx> wrote:

You should look at my second example, it explains it all




"Neill Harper" <neill.harper@xxxxxxxx>
Sent by: web400-bounces@xxxxxxxxxxxx
09-03-2010 20:17
Please respond to
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>


To
"'Web Enabling the AS400 / iSeries'" <web400@xxxxxxxxxxxx>
cc

Subject
Re: [WEB400] Basic question on XML structure






I can't spot the difference between your snippet and the OP's apart from
the
whitespace, which will of course be ignored by a standards compliant
parser
anyway.

Did I miss something else?

Neill

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On
Behalf Of hr@xxxxxxxxxxxx
Sent: 09 March 2010 18:55
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Basic question on XML structure

You express the XML snippits wrong, it should be

<client>
<name>bill</name>
<children>
<child>
<name>jon</name>
</child>
<child>
<name>joe</name>
</child>
</children>
</client>

<client>
<name>bill</name>
<child>
<name>jon</name>
</child>
<child>
<name>joe</name>
</child>
</client>

The first structure is weel structured, the second isn't.







David FOXWELL <David.FOXWELL@xxxxxxxxx>
Sent by: web400-bounces@xxxxxxxxxxxx
09-03-2010 18:12
Please respond to
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>


To
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
cc

Subject
[WEB400] Basic question on XML structure






Hi all,

A little inexperienced in xml here.

Compare these 2 structures :

<client>
<name>bill</name>
<children>
<child>
<name>jon</name>
</child>
<child>
<name>joe</name>
</child>
</children>
</client>

<client>
<name>bill</name>
<child>
<name>jon</name>
</child>
<child>
<name>joe</name>
</child>
</client>

Are there any advantages or disadvantages to using or not using the
element <children>?

We do not use attributes.


Thanks.

--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.

--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.

--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.

--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.