[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: eXpat difficuties with attributes on iSeries



   Hi Hendrik
   You try EXAMPLE15 of HTTPAPI LIB  ??
   You should have an "attrib" parameter in your parser handler ...
   Regards
   Nicolas

   Hendrik Kroon escribió:

   Dear all,


   We are having difficulties to extract data from XML attributes with
   eXpat on the iSeries.

   The XML Elements are going fine.


   see: [1][1]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?


   [[2]cid:image001.jpg@01CA11DF.2974A550]

   [[3]cid:image002.jpg@01CA11DF.2974A550]


   Routine information:


   [[4]cid:image003.jpg@01CA11DF.2974A550]


   Kind regards,


   [[5]cid:image004.jpg@01CA11E3.34896B70]


   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[[6]2]@ibis-management.com
   Visit us online at [3]www.ibis-management.com

                    [[7]cid:image005.jpg@01CA11E3.34896B70]

References

   1. [8]http://www.w3schools.com/xml/xml_attributes.asp
   2. [9]mailto:Morales.Esajas@xxxxxxxxxxxxxxxxxxx
   3. [10]http://www.ibis-management.com/

    _______________________________________________________________________

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
[11]http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------


--
.::.
Nicolas Machado
Metodo Argentina S.A.
_____________________
Tel: 02262 527431
Necochea, Buenos Aires.

References

   1. http://www.w3schools.com/xml/xml_attributes.asp
   2. cid:image001.jpg@01CA11DF.2974A550
   3. cid:image002.jpg@01CA11DF.2974A550
   4. cid:image003.jpg@01CA11DF.2974A550
   5. cid:image004.jpg@01CA11E3.34896B70
   6. mailto:2]@ibis-management.com
   7. cid:image005.jpg@01CA11E3.34896B70
   8. http://www.w3schools.com/xml/xml_attributes.asp
   9. mailto:Morales.Esajas@xxxxxxxxxxxxxxxxxxx
  10. http://www.ibis-management.com/
  11. http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------