[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: eXpat difficuties with attributes on iSeries
Hi Nicolas,
Thank you for the tip, I did a debug on the EXAMPLE15 program as you
indicated in your reply.
Indeed I did not make use of the "attrib" parameter as yet.
I have adapted our own program and tested it with success.
Thank you,
[cid:image004.jpg@01CA1434.8A54D230]
Hendrik Kroon
Software Engineer
IBIS Management Associates Inc.
office Curacao : +5999-737 2065 x 633
office Miami : +1305-767 2875 x 633
fax : +5999-737 2048
cell : +5999-5276543
email : hendrik.kroon[1]@ibis-management.com
Visit us online at [2]www.ibis-management.com
[cid:image005.jpg@01CA1434.8A54D230]
Hi Hendrik
You try EXAMPLE15 of HTTPAPI LIB ??
You should have an "attrib" parameter in your parser handler ...
Regards
Nicolas
Hendrik Kroon escribió:
______________________________________________________________________
From: Hendrik Kroon
Sent: Friday, July 31, 2009 1:31 PM
To: 'ftpapi@xxxxxxxxxxxxxxxxxxxxxx'
Subject: eXpat difficuties with attributes on iSeries
Dear all,
We are having difficulties to extract data from XML attributes with
eXpat on the iSeries.
The XML Elements are going fine.
see: [3]http://www.w3schools.com/xml/xml_attributes.asp
XML Elements vs. Attributes
Take a look at these examples:
<person sex="female">
<firstname>Anna</firstname>
<lastname>Smith</lastname>
</person>
<person>
<sex>female</sex>
<firstname>Anna</firstname>
<lastname>Smith</lastname>
</person>
In the first example sex is an attribute. In the last, sex is an
element. Both examples provide the same information.
There are no rules about when to use attributes and when to use
elements. Attributes are handy in HTML. In XML my advice is to avoid
them. Use elements instead.
When I pass this via Xpath I get the results:
/person/firstname Anna
/person/lastname Smith
/person (something unreadable, hex25 - blank -
blank -hex25 - blank - blank - hex25)
How can we get the "sex" information from this example?
[cid:image006.jpg@01CA1434.8A54D230]
[cid:image007.jpg@01CA1434.8A54D230]
Routine information:
[cid:image008.jpg@01CA1434.8A54D230]
Kind regards,
[cid:image004.jpg@01CA1434.8A54D230]
Hendrik Kroon
Software Engineer
IBIS Management Associates Inc.
office Curacao : +5999-737 2065 x 633
office Miami : +1305-767 2875 x 633
fax : +5999-737 2048
cell : +5999-5276543
email : hendrik.kroon[4]@ibis-management.com
Visit us online at [5]www.ibis-management.com
[cid:image005.jpg@01CA1434.8A54D230]
References
1. mailto:Morales.Esajas@xxxxxxxxxxxxxxxxxxx
2. http://www.ibis-management.com/
3. http://www.w3schools.com/xml/xml_attributes.asp
4. mailto:Morales.Esajas@xxxxxxxxxxxxxxxxxxx
5. http://www.ibis-management.com/
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------