Using SAX Parser

Discussions

XML & Web services: Using SAX Parser

  1. Using SAX Parser (1 messages)

    Hi,
       Iam new to XML..I need to get the the value of userId,userName from the xml in my java programme.The Sample XML is given below..


    xs:element name="Session">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="UserId" type="xs:string"/>
    <xs:element name="BasketId" type="guid"/>
    <xs:element name="CatalogueId" type="xs:string"/>
    <xs:element name="UserName" type="xs:string"/>
    <xs:element name="UserSurname" type="xs:string"/>
    <xs:element name="UserGender">
    <xs:simpleType>

    Can any one pls explai me how to do it or send me sample code in this regards

    Regards
    SamyMohan

    Threaded Messages (1)

  2. Using SAX Parser[ Go to top ]

    Take a look at dom4j.org and just use XPath expressions to get the data out - this is the easiest approach.