Document and Element trick!Please give me hand

hello there
I have a question for ya
What is the difference between Document and Element regarding XML
If I have this
Document r ; how I could convert it Element say e; and vice versa
it is possible to say
Document r;
Element e = (Element) r;
what about
Element e;
Document r = (Document) e;
Thank you alot

A document is, well the root [url http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/core.html#ID-1950641247]node of the document tree. A element is a node in the document tree.
[url http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/core.html#i-Document]Document
The Document interface represents the entire HTML or XML document. Conceptually, it is the root of the document tree, and provides the primary access to the document's data.
Since elements, text nodes, comments, processing instructions, etc. cannot exist outside the context of a Document, the Document interface also contains the factory methods needed to create these objects. The Node objects created have a ownerDocument attribute which associates them with the Document within whose context they were created.
[url http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/core.html#ID-745549614]Element
The Element interface represents an element in an HTML or XML document. Elements may have attributes associated with them; since the Element interface inherits from Node, the generic Node interface attribute attributes may be used to retrieve the set of all attributes for an element. There are methods on the Element interface to retrieve either an Attr object by name or an attribute value by name. In XML, where an attribute value may contain entity references, an Attr object should be retrieved to examine the possibly fairly complex sub-tree representing the attribute value. On the other hand, in HTML, where all attributes have simple string values, methods to directly access an attribute value can safely be used as a convenience.
Recomended Reading:
http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/core.html

Similar Messages

  • Please give a hand.

    Hello experts:
    Thank you in advance for all your replies.
    I have a problem with my SAP P37.
    Since a few days, the system doesn't propose me the last items inserted. I mean, in the past, when filling a field, the system automatically proposed the last items filled in (in the same field) beginning with the same letters/numbers: Now it doesn't happen anymore.
    I didn't ever clean history and this phenomenon happen to all my transactions.
    How could I fix the problem?
    couldn't thank you more.
    Best regards.
    Frank
    Edited by: dongdong guo on Apr 28, 2008 10:31 AM
    Edited by: dongdong guo on Apr 29, 2008 2:53 AM

    Friend,
    Press Alt + F2...
    Go to Local Data tab...
    Set History - > On ( means while typing it will not come until or unless you hit "space"key)
    (or)
    Set History -> Immediately (means while typing it will show you the history immediately)
    And also check the "Directory for Local data".... usually it will directed to your system "My Documents"...If not do so...
    And also see the "Maximum number of Entries"....if it is not given....then give 20....there....
    click apply....Ok... then try...again....
    And moreover.....
    (Most probably in your "My Documents")
    There is the directory to store the input history and the cache files. The directory must exist and you must be able to write to it.
    The history files like SAPLocalData.mdb and SAPLocalData.ldb will be stored direct under this directory.
    The cache files will be stored under its subdirectories SAP_Cache_/Cache1, SAP_Cache_/Cache2 etc..
    If the files SAPLocalData.mdb  and SAPLocalData.ldb is not there in your local data directory ...then you will not get the history ....

  • IPhoto and Aperture organization please give me your advice

    Well, decided to set up my account here as I see this forum is very helpful.
    I had all my photos organized in Iphoto, but because I bought a camera that shoots Raw decided to get a Aperture to edit my RAW pictures.
    But now I don't know what to do, because I don't want to end up with two libraries to take care, would like something more practical, and also would save space on my
    HD, anyone have any suggestions, how do you organize yourself if you have both?
    Thank you !

    Simply: Use Aperture. It will do just about everything that iPhoto will do, plus has much more powerful editing and organising tools. It is an excellent tool for working with RAWs, whereas iPhoto’s RAW support is pretty much tacked on.
    Then if there is something that iPhoto does that you want, you can share your Aperture Previews into iPhoto (File -> Show Aperture Library) and just darg the pics over.
    Regards
    TD

  • HT Problem. Please give your hand.

    Motherboard: MSI GNB MAX-FISR
    CPU: Intel P4 3.06G FSB533
    OS: Windows XP Professional + SP1
    I already set Hyper Threading to Enable in BIOS. But I only can see 1 CPU in Task Manager, even I can read 2 CPUs in Device Manager. Is there anybody can tell me waht's wrong? And instruct me how to make HT works in Windows XP. Many thanks for your help.

    It's not necessary to enable it before windows is installed...
    I put my new 2.8C in last week and it worked perfectly without reinstalling windows....
    when i look at the performance (??, not using english windows  ?( ) i can see 2 graphs that represent the HT cpu (1 for each 'cpu')...

  • Please give me hand !!it looks like simple problem but!!

    something happened to my machine so now
    when I run the following command :
    c:>java mydir/myclass I get this error:
    Exception in thread "main" java.lang.NoClassDefFoundError: mydir/myclass
    Do you know how I solve this problem?
    By the way it was working fine.
    Thanx

    Thanks alot for your suggestion but it does not work
    I used to run it as follow for many months
    java mydir/myclass
    and it was working fine. Well, what do you know...you're right.
    java has some syntactic sugar to deal with being called wrong.
    The problem happened after I
    try to set path in may machine using
    setpath command
    Do you think I have to update system variables and so
    onPossibly. Who knows what new and pointless hurdles you have to jump through on a Microsoft box.
    Has the class changed at all?
    Are you executing it from the same directory you always were?
    What else could have changed on your system? Install any new software lately?

  • It Gives me no reason this message often the first to enter my pass:" When you can not buy Equilibrium - Leonardo da Vinci's Balance Puzzle " and 27other elements. Please try again later". How can I remove this annoyng message? Maybe it's a Virus?

    It Gives me no reason this message often the first to enter my pass:" When you can not buy Equilibrium - Leonardo da Vinci's Balance Puzzle " and 27other elements. Please try again later". How can I remove this annoyng message? Maybe it's a Virus?

    The old rule of thumb was to keep 10-12 GB free. Any lower than that and you will start to have trouble. I was very close to that for a long time and never had any complaints. Now, Lion "encourages" 20% free space (on my newer 250 GB drive) so I try to keep it with more than 50 GB free.
    Do you still have the original memory in that machine too? The metal plate you have to remove in the battery compartment also provides access to the RAM. Your machine will take 2 GB of RAM, possibly 3. You definitely want to max that out too.
    Regardless, you definitely need a new hard drive. When Apple switched to PC components, they had to take a quality hit. These 2.5" notebook hard drives are not very reliable. I'm surprised your hard drive hasn't died by now. I usually get a new hard drive with every major OS upgrade. A $ 50 investment every couple of years is no big deal.
    Unfortunately, you (and I) suffer from being an early adopter in 2006. Those 32-bit machines only accept 2 GB RAM (maybe 3) and are only 32-bit so they can't be upgraded to Lion. Because of this limitation, you won't see as dramatic an improvement as you would with a 2007 machine. If you run more than a couple of applications, your hard drive is always going to have to be doing some VM work. My 2006 machine has even lost its bluetooth. I gave it to my brother. My very similar 2007 Macbook is still running great.
    So, you must get a new hard drive because your old one is likely on death's door. If you don't have at least 2 GB - get it. If you can't afford a new machine, you might want to consider an SSD. That might help mitigate your RAM limitations. You can spend from $ 100 to $ 350 and get a dramatic speed improvement.

  • I want to start a new iTunes U course for catolog and I don't know what can I do please give me description about this title.

    I want to start a new iTunes U course for catolog and I don't know what can I do please give me description about this title.

    If you haven't already done so then you can contact iTunes support via this page and ask them why the message is appearing (these are user-to-user forums, we won't know why) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • Is there a way of opening up old PSD documents and photos on the iMac please?

    Is there a way of opening up old PSD documents and photos on the iMac please?

    .psd (photoshop) files should open in preview to view them and make some simple adjustments. 
    If you want to edit them but don't want the expense of buying Photoshop (or Elements) for your Mac, consider downloading Gimp - it's free.
    http://www.gimp.org/downloads/

  • Can someone please give me a step-by-step guide on how to embed a video in my Indesign document?

    Can someone please give me a step-by-step guide on how to embed a video in my Indesign document? I've got CS4 and I've tried to follow Adobe's instructions. Even Creative Suite 4 for Dummies. But I can't get it to work. And yes, I understand the video will only play when exported as a pdf -- not in the indesign document. Help! Donna

    Please repost in the InDesign forum along with full details including what the problem is.
    Telling us it doesn’t work is meaningless.
    Bob

  • Can any body please give me an idea and the Import and Export process?

    Can any body please give me an idea and the Import and Export process? Excise Duty and other duties and so on.
    I will be highly obliged for the help.
    Regards,
    Subhasish

    for importing material,every importer has to file bill of entry in customs.
    first vendor send some documents like certificate of origine , bill of lading, packing list etc to importer.
    on the basis of those documents,importer makes supporting documents like duty calculation sheet, GATE declaration form,CHA declaration form,insurance certificate.
    CHA (custom house agent ) file the bill of entry on behalf of impoter in customs.
    custom verify it.
    after duty payment, CHA can clears the consignment from custom.
    there are two typs of BOE.
    1 Home consumption BOE
    2 Warehousing BOE
    in 1st type of BOE , payment of duty is done at the time of custom clearance
    and in 2nd type of BOE, importer can put material in warehouse without payment of duty. at time of using those material from warehouse,importer has to file out bond warehouse BOE and pay the all duties.

  • My ipad is taking restart automatically and screen is fully balck and showing only apple logo.please give me solution for that

    my ipad is taking restart automatically and screen is fully balck and showing only apple logo.please give me solution for that

    Have you tried a reset first? If it works, you won't have to go through the restore process.
    Hold down the sleep (upper right hand top) and the home button at the same time. A slider will appear. Ignore it and keep holding down the buttons. The Apple logo shoud appear. Then your ipad might work again. It takes a good 15 seconds. You will not lose anything on your ipad.
    If you try it a couple of times and it doesn't work, you might have to go through the restore process as has been suggested above. But follow the steps so you don't lose your data.
    Hope this helps.

  • Does allowing adobe flash player plug in on safari give access to websites the ability to upload and transfer documents and files(on the computer) without permission?

    Does allowing adobe flash player plug in on safari give access to websites the ability to upload and transfer documents and files(on the computer) without permission? Perhaps to their online server or somewhere where they designated them to transfer to?

    It depends a bit on which version of Captivate you used to develop your modules and also which version of Flash Player you targeted when publishing your modules from Captivate. Say for example you use Captivate 5 and publish to Flash Player 10. Then your end user would need to have Flash Player 10 on their computer. It shouldn't matter if their version is 10.0.0 or 10.1.0 or 10.1.3 - just as long as it's a 10. If they only have Flash Player 9 then they will need to upgrade.
    The "Access to Adobe.com is restricted" is most likely because the HTML that launches the Captivate SWF sees that you have targeted FP10 and the user only have FP9. Then it tries to direct a call to Adobe in order to present an "Upgrade to latest version of Flash" dialog for the user. This traffic is most likely denied by your IT department.
    The first step is to find out which version of Flash Player is the most prevalent in your organization. If it is Flash Player 9 then simply select that when publishing from Captivate 5. If Flash Player 8 is the most used in your organization and you have CP5 or CP5.5 then you are in big trouble since FP8 is not supported from CP5 and CP5.5.
    /Michael
    www.cpguru.com - Adobe Captivate Widgets, Tutorials, Tips & Tricks and much more..

  • Hello to you all, my Macbook Air won's boot up and upon diagnosis, i realized my startup disk is full to 99% even with 2GB Hard Disk space. It wont also enable me boot into safe mode too. Please help as all my work documents and project files are on HD

    Hello to you all,
    My Macbook Air won's boot up and upon diagnosis, i realized my startup disk is full to 99% even with 2GB Hard Disk space. It wont also enable me boot into safe mode too.
    when i power up, i get this prolong gray screen which wont change screen but remain so. Infact i am handicapped.
    Please help as all my work documents and project files are on this machine and i can't afford to loose them all...
    Please, should you have any solution please send me the details to [email protected]
    Thanks you a millionh times.
    Al.

    The MBA seems to cause several problems to several users on boot ups
    On start up my MBA would not boot up the apple logo came on but only a blank screen appeared no fan i followed several start up recommendations but to no avail so I  took the MBA to the nearest Apple repair centre again the same symptoms on start up ......very sorry sir you need a new mother board that will be $500 not feeling confidant in the product declined and was going to put it on ebay for spares.
    On return home I pressed the start up button and it started normally everything was working fine i decided to reinstall all the software what has caused the problem I have no idea but it is after several attempted reboots it finally started on its own so don't give up if you have this problem it may come to life

  • We updated to the new Pages 5.0.1 and now none of our Pages 9 documents will open. Please help.

    We updated to the new Pages 5.0.1 and now none of our Pages 9 documents will open. Please help.

    Since you have Pages '09 documents it is safe to assume that you own Pages '09.  If you bought it from the App Store you should be able to download it again to your new machine.  If you have the install disks, you can install it on the new machine and the find the updater for it.
    Or you can go to the Apple Store (make an appointment) and get them to install iWork '09 on your machine.  They will do this for free if you can provide any proof that you owned it on your older machine.  They may do it for free anyway.
    As others said, your '09 files should open, so perhaps they were '08 files.  In which case you must open with '09 first.  For this reason Apple will sometimes give you a free version of iWork '09.  If you are not near an Apple Store try phoning them.  No guarantees, but others have reported that Apple sent them a free DVD.
    Worse comes to worse, look to buy it on Amazon or eBay, but try Apple first.

  • Not able to open adobe XI Pro after I have filled out a documents and trying saving it. The program stops working & won't open up again.  Tried to complete a repair, rebooting nothing works. Help please.

    Not able to open adobe XI Pro after I have filled out a documents and trying saving it. The program stops working & won't open up again.  Tried to complete a repair, rebooting nothing works. Help please.

    Hi,
    Can you pls. provide more details of the issue?
    OS/Platform
    It would be great if you can provide the MSI logs for repair from the %temp% directory.
    Thanks,

Maybe you are looking for