JAVA-SAX-Xml how to get simple tag element names to a list

Advertisement

i need to get the simple tag names(here it is name,price,aname,city) in to a list i have heard about SAX parser event driven it walks throgh the xml step by step when a new tag occurs it will parse etc....
but i am unable to get the only sampletag names into a Arraylist
i have heard about a method getElementBytagName()
i dont want to write a code for particular xml because later on i have to retrive same simple tags from another xml say employee.xml
please provide a generic code which will retrive the simple tag names and stores into a Arraylist
the real xml i want to store only simple elements into array list
<ProvisionViewingCardprovisionViewingCar>
<orderId>1</orderId>
<numberOfCards>2</numberOfCards>
<customerSite>
<customerSiteSystemId>3</customerSiteSystemId>
<customerSiteID>4</customerSiteID>
<customerSiteState>5</customerSiteState>
<parentCustomerSiteID>6</parentCustomerSiteID>
<businessName>7</businessName>
<migratedCustomerID>8</migratedCustomerID>
<businessContactInformation>
<contactID>9</contactID>
<emailInfo>
     <additionalEmailAddress>10</additionalEmailAddress>
     <emailAddress>11</emailAddress>
</emailInfo>
<communicationPreference>12</communicationPreference>
<mobileNumber>13</mobileNumber>
<faxNumber>14</faxNumber>
<contactExceptions>15</contactExceptions>
<telephoneNumber>16</telephoneNumber>
</businessContactInformation>
<address>
<addressID>17</addressID>
<addressLine1>18</addressLine1>
<addressLine2>19</addressLine2>
<addressLine3>20</addressLine3>
<town>21</town>
<county>22</county>
<postCode>22_1</postCode>
<country>23</country>
</address>
<person>
<personID>24</personID>
<title>25</title>
<firstName>26</firstName>
<middleName>27</middleName>
<dataProtectionPreference>28</dataProtectionPreference>
<surname>29</surname>
<dateOfBirth>30</dateOfBirth>
<position>31</position>
<!--1 or more repetitions:-->
<authority>32</authority>
<address>
<addressID>33</addressID>
<addressLine1>34</addressLine1>
<addressLine2>35</addressLine2>
<addressLine3>36</addressLine3>
<town>37</town>
<county>38</county>
<postCode>39</postCode>
<country>40</country>
</address>
Regards/
Suman.

Advertisement

i need to get the simple tag names(here it is name,price,aname,city) in to a list i have heard about SAX parser event driven it walks throgh the xml step by step when a new tag occurs it will parse etc....
but i am unable to get the only sampletag names into a Arraylist
i have heard about a method getElementBytagName()
i dont want to write a code for particular xml because later on i have to retrive same simple tags from another xml say employee.xml
please provide a generic code which will retrive the simple tag names and stores into a Arraylist
the real xml i want to store only simple elements into array list
<ProvisionViewingCardprovisionViewingCar>
<orderId>1</orderId>
<numberOfCards>2</numberOfCards>
<customerSite>
<customerSiteSystemId>3</customerSiteSystemId>
<customerSiteID>4</customerSiteID>
<customerSiteState>5</customerSiteState>
<parentCustomerSiteID>6</parentCustomerSiteID>
<businessName>7</businessName>
<migratedCustomerID>8</migratedCustomerID>
<businessContactInformation>
<contactID>9</contactID>
<emailInfo>
     <additionalEmailAddress>10</additionalEmailAddress>
     <emailAddress>11</emailAddress>
</emailInfo>
<communicationPreference>12</communicationPreference>
<mobileNumber>13</mobileNumber>
<faxNumber>14</faxNumber>
<contactExceptions>15</contactExceptions>
<telephoneNumber>16</telephoneNumber>
</businessContactInformation>
<address>
<addressID>17</addressID>
<addressLine1>18</addressLine1>
<addressLine2>19</addressLine2>
<addressLine3>20</addressLine3>
<town>21</town>
<county>22</county>
<postCode>22_1</postCode>
<country>23</country>
</address>
<person>
<personID>24</personID>
<title>25</title>
<firstName>26</firstName>
<middleName>27</middleName>
<dataProtectionPreference>28</dataProtectionPreference>
<surname>29</surname>
<dateOfBirth>30</dateOfBirth>
<position>31</position>
<!--1 or more repetitions:-->
<authority>32</authority>
<address>
<addressID>33</addressID>
<addressLine1>34</addressLine1>
<addressLine2>35</addressLine2>
<addressLine3>36</addressLine3>
<town>37</town>
<county>38</county>
<postCode>39</postCode>
<country>40</country>
</address>
Regards/
Suman.

November 30, -0001

JAVA-SAX-Xml how to get simple tag element names to a list

i need to get the simple tag names(here it is name,price,aname,city) in to a list i have heard about SAX parser event driven it walks throgh the xml step by step when a new tag occurs it will parse etc.... but i am unable to get the only sampletag na

How to get required tags and name spaces in the output File?

Hello, I am doing IDOC to File sceanrio and I am able to get the file but the problem is that I am unable to get the required tag names. Out put file is having  ns0 ns1 and so on.. Eg: ns2:MaterialDefinitionProperty><ns2:MaterialDefinitionProperty&g

How to get the tag name into javascript

Hi, Is there any way to get the tag name into java script when user clicks on. For eg: if i use netui:anchor tag, how can I pass the tag id to the javascript when user clicks on the link using onClick attribute. This tag id needs to be evaluated at r

How to get vlan tag programe with mac book air

how to get vlan tag programe with mac book air,i'm using the usb ethernet adapterFor prompt help contact TATA. For more on this: https://discussions.apple.com/thread/3680625?tstart=270Read other 2 answers

How to get the Portal Page name from PLSQL?

Can anyone tell me how to get the portal page name from my dynamic page using plsql? Apparently you can get the page id and work it out from there, but my calls to get the page id are not returning any values anyway. My code for attempting to get the

How to get the report server name in Forms 10g.

How to get the report server name in Forms 10g. I'm using the Application Server 10g 10.1.2.Hello, I do not think that you can get this value from anywhere. A solution is to put the Reports server name in an environment variable stored in the /forms/

How to get a parameter without name in JSP?

hi everyone, My question is how to get a parameter without name in JSP? I have two pages, 1.html and 2.jsp. in 1.html, I embeds some Javascript codes in HTML contents like below ( changed < to ( , > to )): function toSubWin( obj ) window.open('test.

How to get the store procedure name inside this store procedure?

how to get the store procedure name inside this store procedure?Why cant you get the procedure name as hard code as the proc name is going to change. Are you looking for getting the parent proc name from child proc name which is getting executed with

How to get customer number and name from the SD document

Hi All, Can you please let me know how to get Customer Number and Name from the SD Document? Thanks a lot.... AnilHi, It will be displayed in the SD (BIlling document) itself,  you clikc on the VF03. The customer name and number will also appear in t

Index file share with pictures - how to get the "Tag" property as refiner?

Hi, I'm indexing a folder in file share and in the windows explorer view i gave values to the "Tags" property. Now i want to set it as refiner in search results. I see that SharePoint gets the properties of: file name, size, picture height, pict

How to get the pull path name from a file upload window

Hello everyone! I have encountered the following problem with the following JSP code: <form method="post" action="filename.jsp"> Upload JAVA program: <input type=file size=20 name="fname" accept="java">

How to get the field row name of database from a form?

Hello experts, I am newer in OIM and developments with the API's. I have this environment, one resource that have the attribute department relationship with the database row UD_RESOURCE1_DEPARTMENT and other resource with the same attribute in, UD_RE

How to get message/rfc822 attachment name by using JavaMail

Hi, I am fetching incoming mail which has message/rfc822 attachment. i.e: ".msg" (mime message) is attached to this incoming mail. When I try to get name of this message/rfc822 attachment, I am getting null. Body part for this message attachment

How to get selection screen elements and its table reference of a report ?

halo experts How can I get selection screen elements and its table reference of a report ? . I tried rs_refresh_from_select_options. But I am unable to get the table and field it is referring to For eg if my selection screen 1000 is parameters: p_car

How to get rid of file name that pops up with mouseover?

When a user is on my website and mouses over a link to another page, the name of that page comes up - for example, if I mouse over the link to the Mums Night Out page (while on the home page) the file name pops up (mumsnightout.html) Any idea on how

How to get Current Page(region)  Name/ID   in OA 11i

We need to get the name or id of the current page, and based on the pagename, we retrieve configuration to launch specific web service. pageContext.getPageLayoutBean().getPageFunctionName() is no sufficient. Since one page function sometimes contain

How to get Driver and url names from a connection pool

Hi, How to get the DriverName and URL from an existing pool, If I know the name of connection pool ? Is it possible to know the name of related pool , if I know the name of datasource? Thx Manishhi there are 2 ways: url must be: jdbc:weblogic:pool[:c

How to get 25 chara. long name of keyfigure Stru.

hi friends      i use Bx3.0.      how to get tech. name of keyfigure , is there something 25 chara long name ?.     thank's in adv.You can check the same in Infoobject-> Addl.properties> or bex tab---> for tech name in query - > select the obj

HR - How to get External person first name

Hi , Can anyone tell me how to get the first name for external person (otype = H) ? I can get the full name from HRP1000-STEXT but I need to get the first name. Any FM/Piece of code is there for this ? Thanks in advance. Regards, Sandip. Ph:+44 121 6

How to get the page FUNCTION NAME?

Hi All, How can I get the page Function Name? I tried below codes but it returns null value. <i>pageContext.getPageLayoutBean().getAttributeValue(FUNCTION_NAME)</i> Please help. Thanks!Sorry guys, i got it now. instead of getAttributeValue, us