Can I Use  SAX  and DOM in same application?

Hi,
Here is my requirement. I am using Apache's SAX parser for my appliaction. The below xml is the sample xml i am processing.How can I know the parent of element 'C' using sax? Is there any way i can differentiate the element under <B> and under <A>? Or do i need to use DOM, when you encouter <C> and find out it's parent.?
If any one had this situation,Please respond with some code examples.
<A>
<B>
<C>aa</C>
</B>
<C>bb</C>
</A>
Thanx

When using SAX, your application is notified about nodes as the parser encounters them, sequentially. There is no concept of a parent/child relationship for elements. When using SAX, you must develop this logic yourself.
When using DOM, the contents of the XML file are read into a tree structure. If you have a reference to the node object that represents "C", you can get a reference to its parent by calling getParentNode().
Hope this helps.
Greg
>
Hi,
Here is my requirement. I am using Apache's SAX parser
for my appliaction. The below xml is the sample xml i
am processing.How can I know the parent of element 'C'
using sax? Is there any way i can differentiate the
element under <B> and under <A>? Or do i need to
use DOM, when you encouter <C> and find out it's
parent.?
If any one had this situation,Please respond with
some code examples.
<A>
<B>
<C>aa</C>
</B>
<C>bb</C>
</A>
Thanx

Similar Messages

  • Satelitte C55-A Can't Use Keyboard and Mousepad at same time

    How do I change the settings so that I can use them both at the same time? I use them both for all my games, but I can't turn with my mouse pad when im walking with my keyboard keys (W,A,S,D). Does anyone know how to change this?
    I'm on Windows 8 btw.
    Thanks,
    -Evan

    There should be a setting for that in Mouse Properties, Evan. Something like "Disable touchpad while typing."
    Also, it's a "feature" of Windows 8.1.
       Button clicks for internal touchpads and pointing sticks are not responsive while or shortly after t...
    Windows 8.1 introduces a feature that is called accidental activation prevention (AAP). AAP helps ensure that unintended taps while you type on an integrated touchpad are suppressed. When this feature is enabled, taps and clicks from an integrated touchpad or pointing stick are suppressed for a while after the last keystroke..
    -Jerry

  • I can't use PS3 and Laptop at same time ?

    OK I'm hoping although strange this might be a simple as changing a setting in my hub or laptop, here goes:-
    Like many housholds nowadays I have many things connected to my Hub, Desktop, Ipod, Phone, Sky, games machines,etc
    Well the problem I have, is when I stream Netflix or Amazon prime on my PS3 it buffers a lot or wont go HD for quite some time, no problem I switched to a wired set up, which helped with speed a lot, happily watching movies of an evening,
    then one evening, it kept saying it's taking a long time to sign in, and wouldn't, I re check my network settings, and it shows unable to obtain an ip address,
    so I set up the wirless again, and the same problem,
     anyway after a few nights of this, I get a bit fed up, then out of the blue, it works again, both wireless and when I switch back to wired,
    so I settle down to watch a film, fire up laptop, and after a few mins it flashes on my PS3 I have been disconnected, I peice things to gether and realise, when I have laptop on I cant connect PS3, even if laptop is wirless and PS3 wired ?.
    I assume they are both using the same ip ?, I deleted the laptop from my Hub in the hope it would assign another, fired up PS3, and then re booted laptop, but straight away it kicks out PS3.
    I have mooched arround in hub advanced settings, but I dont know what I'm doing, so not going to adjust anything, so if it is just a case of modifying my laptop or hub settings, if someone could instruct me I would be greatful, and if its not thought to be that HHEEEEEEEEEEEEEEEEEEEEEELLPP   Please
    Thanks in advance
    Chris
    P.S. I have searched the forums, there seems to be a lot of PS3 connection problems, but nothing that matches my particular problems

    No I'm afraid that didn't work either

  • Can I use multiple iPhones on the same iTunes account? e.g. my wife and I each have iPhones

    can I use multiple iPhones on the same iTunes account? e.g. my wife and I each have iPhones

    Yes, you can have as many devices - iPhones, iPods, iPads - as you like using the same iTunes account.

  • Can we use exceptions and conditions at the same time?

    can we use exceptions and conditions at the same time? Are there any dependencies between exceptions an conditions?

    Exceptions are used when there are some mistakes , or exceeds the supposed values, we can highligt that in different colours for enabling the validator to notice easily. In this we are giving conditions for considering the value as exceptions. suppose, if the values is out of the range -1 to +1 then exception.
    But conditions can be considered as the restrictions given in measure level also. So please elaborate what you meant by conditions

  • Can I switch back and forth the same sim card between an old iPhone 4 and a new one never used in order to activate the latter? Should I use same Apple Account?

    Can I switch back and forth the same sim card between an old iPhone 4 and a new one never used in order to activate the latter? Should I use same Apple Account? Should I activate it via WiFi or iTunes? I am filtering on the MAC no and I cannot read that number from the new iPhone without having it activated??!!
    All I want do is to have the new phone activated and then tested!
    Ciao // Mufftas

    Yes, you can do that.

  • Can I Use 2 iPods On The Same PC?

    Hi.. I own an iPod Nano and use iTunes on my microsoft laptop. My younger brother is getting his own iPod soon and he would be using my laptop to put songs onto his iPod.
    Can I Use 2 iPods On The Same PC?
    & Can He Have The Same Songs As Me On His iPod? Or Are Songs Only Allowed On 1 iPod?
    Many Thanks.

    Hi gmsunshine,
    Yes, it's possible to do this kind of thing. There are a few different methods in doing this kind of thing.
    For information on what your options are, and how to manage multiple iPods using one computer, check out this Apple Knowledge Base article, here:
    How to manage multiple iPods using one computer
    -Kylene

  • Can we use overload and overwrite concept in OO-abap

    hi
    can we use overload and overwrite concept in OO-abap

    Hi
    CLASS zl_lcl_vehicle DEFINITION.
    PUBLIC SECTION.
    Signature of method
    METHODS: set_make
    IMPORTING value(im_make) TYPE string " Pass by value
    im_model TYPE string," Pass by reference
    ENDCLASS. "zl_lcl_vehicle DEFINITION
    CLASS zl_lcl_vehicle IMPLEMENTATION.
    Implementation of method.
    METHOD set_make.
    IF im_make IS NOT INITIAL
    AND im_model IS NOT INITIAL.
    gv_make = im_make.
    gv_model = im_model.
    ENDIF.
    ENDMETHOD. "set_make
    ENDCLASS. "zl_lcl_vehicle
    Overloading means changing signature as well as implementation of a method.
    Overriding is changing only implementation of method with signature unchanged.
    From ABAP perspective, only the CONSTRUCTOR method can be overloaded in a subclass i.e both the signature and implementation can be adapted in subclass.
    Any other method can't be overloaded. It can only be redefined/overridden i.e implementation changed with signature unchanged.
    In ABAP  there is something called a redefinition.
    When you inherit a class from a super class, you can redifne a method. You cannot chnage the signature( Interface) of the method. It will remain the same as that of the super class.You must redefine a method in the same visibility section in which it appears in the superclass.
    Eg.
    CLASS C_SUPER_CLASS DEFINITION .
    PUBLIC SECTION.
    METHODS: DRIVE ,
    STOP.
    PROTECTED SECTION.
    DATA SPEED TYPE I.
    ENDCLASS.
    CLASS C_SUPER_CLASS IMPLEMENTATION.
    METHOD DRIVE.
    SPEED = 0.
    WRITE: / 'Bike speed =', SPEED.
    ENDMETHOD.
    ENDCLASS.
    CLASS C_SUB_CLASS DEFINITION INHERITING FROM C_SUPER_CLASS.
    PUBLIC SECTION.
    METHODS DRIVE REDEFINITION.
    ENDCLASS
    CLASS C_SUB_CLASS IMPLEMENTATION.
    METHOD DRIVE.
    SPEED = SPEED + 10.
    WRITE: / 'Bicycle speed =', SPEED.
    ENDMETHOD.
    ENDCLASS.
    Regards
    Vasu

  • Can't use Hosting and Business Catalyst

    I have full CC-Membership, but can't use Hosting and BC.
    Following messages appearing on my CC-Account:
    On the apps-Page:
    "Full Creative Cloud Membership comes with hosting for up to 5 sites. View and manage these sites from the sidebar on the Creative Cloud home page."
    On the sidebar
    "Full Creative Cloud Membership comes with hosting for up to 5 sites."

    Same. This had me perplexed too for a while. And the 'help' pages aren't particularly 'helpful', so I did little poking around in the apps themselves.
    As it turns out, if you open up Dreamweaver and go to the 'Site' menu, there's an option to create a Business Catalyst test site from there (Dreamweaver helpfully crashed for me while doing this, but upon reopening it was all working). You pick a  site name and subdomain, assign a local folder, it asks for your CC/Adobe credentials (because it would make too much sense to just sign in automatically) and you should be good to go.
    After doing this and uploading a dummy test page, when I reloaded the Creative Cloud homepage it was now listing my test site undeneath the aforementioned confusing text in the sidebar.
    Hope that helps.

  • Tried to use Iphoto and was told I needed upgrade. Try to install upgrade . Upgrade should take an hour if photo library is large. It's now close to three hours and still upgrading.  Can't use Iphoto and don't want to stop if still upgrading...3hours??

    Tried to use Iphoto and was told I needed upgrade. Try to install upgrade . Upgrade should take an hour if photo library is large. It's now close to three hours and still upgrading.  Can't use Iphoto and don't want to stop if still upgrading...3hours??

    You are on Windows 2000, you do not have a "Firefox" button, and should consider yourself to be fortunate in that you still have menus and don't have to do anything to get the menus back instead of the "Firefox" button. (The same applies to Windows XP users).
    Use the "File" menu to get to Import. You are not on Windows 7 or Vista, and don't have to put up with the nonsense added for Aero.
    If you want the "Firefox" button you can get it with View -> toolbars -> (uncheck) Menu Bar. The menu bar and the "Firefox" button were supposed to be mutually exclusive (which is impossible in some cases without being incompatible).
    Once you are using the "Firefox" button ...
    Use the "Alt" key to view the menu bar (temporarily) containing File, Edit, View, History, Bookmarks, Tools, and Help. On Windows 7 and Vista, the menu bar was hidden by default in Firefox 4 and above. These menu items are more or less available under the "Firefox" button which has the most used of the built-in Firefox menu items available in a different format.
    To get back to having menus again. "Firefox" button -> Options (second column) -> (check) Menu Bar
    You can make '''Firefox 7.0.1''' look like Firefox 3.6.*, see numbered '''items 1-10''' in the following topic [http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface Fix Firefox 4.0 toolbar user interface, problems (Make Firefox 4.0 thru 8.0, look like 3.6)]. ''Whether or not you make changes, you should be aware of what has changed and what you have to do to use changed or missing features.''
    * http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface

  • What Itunes version can i use both and ipod classic and ipod touch?

    What Itunes version can i use both and ipod classic and ipod touch?

    Hello laurie0823,
    already have ipod 32 gig and just go ipod touch 8 gig can i use both on same itunes account?
    Yes. There is no limit to the number of iPods you can have synced with one iTunes account or library.
    if i hook up ipod touch will i lose all of the stuff in library or can i sync library to ipod touch?
    No you can sync your content to any number of devices.
    Simply, plug new iPod in, configure it to sync with iTunes library however you wish and be on your way.
    For more help on different ways to manage multiple ipods with one computer, see this Apple support document.
    http://support.apple.com/kb/HT1495
    B-rock

  • I currently have an iphone that i connect to my mac air to download music, i have now bought a nano for my wife can we use both devices on the same air without any problems???

    i currently have an iphone that i connect to my mac air to download music, i have now bought a nano for my wife can we use both devices on the same air without any problems???

    My wife and I both have the iPhone 4 and it's actually pretty simple. Add another user on your MBA (her) and she can use the other iTunes when she is logged in. The iTunes is empty and will erase her iPhone, so be sure that she syncs her iPhone, then back up her library onto a portable media device like I did (SD Card) and reload it onto her empty iTunes on your MBA before she attempts to sync with it.
    Works well...
    Sly

  • How can I use OmniPortlet and Web Clipping Portlet?

    How can I use OmniPortlet and Web Clipping Portlet?

    You find information on OmniPortlet and Web Clipping in the Portal Developer's Guide.
    o Building Portlets with OmniPortlet
    o Building Content-Based Portlets with Web Clipping
    Peter

  • How can I use excel and word on the IPAD2

    How can I use excel and word documents on my Ipad 2

    There are apps such as Documents To Go which support reading/editting/creating those sorts of documents :
    standard version  -  http://itunes.apple.com/us/app/documents-to-go-office-suite/id317117961?mt=8
    premium version  -  http://itunes.apple.com/us/app/documents-to-go-premium-office/id317107309?mt=8

  • How can I use undo and redo with run time menu?

    Hi..I try to built my own menu for graphic programming. How can I use undo and redo in labview with run time menu?

    filozof-
    During runtime, by default, LabVIEW has undo/redo data changes under the edit menu. This will undo/redo changes made to controls during runtime. If you want a more extensive undo/redo (custom for your application), you are going to have to do quite a few things
    1) Create a custom runtime menu (Edit>>RunTime Menu) and place your own undo/redo controls on it
    2) Keep an action history in your program
    3) Catch the Shortcut menu event for your custom undo/redo controls
    4) Reverse the last action in your histroy when you catch the event
    This method would allow you undo entire operations (like resize, move, or whatever kind of functionality you are building into your application) unstead of just undoing data changes.
    Xaq

Maybe you are looking for

  • Questions about my library just moved to NAS.  Download errors.  Would USB be better?

    Thanks for reading.  My situation is that my itunes library is running about 500gb and I needed to get it off my imac.  I bought a 2TB NAS and copied the entire library folder to that drive and changed itunes to go there. What I'm finding is that dow

  • How can I read the data type of a field in an MS Access database

    I need to be able to determine if a field in an Access database is of a certain data type, and if it isn't, to change it to what it should be. I can't seem to find any way of reading the data type of any field in any table - can anyone give me a meto

  • Stop sending signal to external display without unplugging the cable

    Stupid question: if I toggle through the display settings (F7), it doesn't seem as if any go to shutting off the external display (like maybe I want to make a change I don't want my audience to see, I would like to shut it off without unplugging, the

  • Failure to Send -- Again & Again

    Far too frequently than should be, Mail is simply refusing to Send mail. Then the message winds up in the Outbox. I try to use message>send again, and it still doesn't work. This machine is connected to a cox.net server via cable modem, and the confi

  • Some fields in table FAGLPOSX is specified twice.

    hi all, i have a problem   Field AWSYS in table FAGLPOSX is specified twice. Please check   Field AWTYP in table FAGLPOSX is specified twice. Please check some fields... how to delete those repeated fields in that structure.. Regards, subhash