Questions tagged [document]

Is a term that in computer science can refer to various file types containing usually human readable information, if opened with appropriate software.

Documents can be written in various formats; each one usually has a specific extension, which is used to identify the format of the document. One or more applications (which are able to read and represent, or modify and write, the document format) can be associated with the format, to support intuitive handling by the human user.

2979 questions
323
votes
17 answers

How to get the entire document HTML as a string?

Is there a way in JS to get the entire HTML within the html tags, as a string? document.documentElement.??
Robin Rodricks
  • 110,798
  • 141
  • 398
  • 607
196
votes
13 answers

MongoDB: How to update multiple documents with a single command?

I was surprised to find that the following example code only updates a single document: > db.test.save({"_id":1, "foo":"bar"}); > db.test.save({"_id":2, "foo":"bar"}); > db.test.update({"foo":"bar"}, {"$set":{"test":"success!"}}); >…
Luke Dennis
  • 14,212
  • 17
  • 56
  • 69
191
votes
4 answers

$(window).scrollTop() vs. $(document).scrollTop()

What's the difference between: $(window).scrollTop() and $(document).scrollTop() Thanks.
frenchie
  • 51,731
  • 109
  • 304
  • 510
152
votes
9 answers

Create a folder inside documents folder in iOS apps

I just want to create new folders in the documents folder of my iPhone app. Does anybody know how to do that? Appreciate your help!
Mina Mikhael
  • 2,825
  • 6
  • 27
  • 31
149
votes
27 answers

Selenium wait until document is ready

Can anyone let me how can I make selenium wait until the time the page loads completely? I want something generic, I know I can configure WebDriverWait and call something like 'find' to make it wait but I don't go that far. I just need to test that…
Girish
  • 1,981
  • 3
  • 17
  • 18
121
votes
6 answers

How to get the size of single document in Mongodb?

I encountered a strange behavior of mongo and I would like to clarify it a bit... My request is simple as that: I would like to get a size of single document in collection. I found two possible solutions: Object.bsonsize - some javascript method…
user1949763
  • 3,583
  • 3
  • 16
  • 12
114
votes
8 answers

Difference between $(document.body) and $('body')

I am a jQuery beginner and while going through some code examples I found: $(document.body) and $('body') Is there any difference between these two?
user1617640
108
votes
4 answers

How do I load an org.w3c.dom.Document from XML in a string?

I have a complete XML document in a string and would like a Document object. Google turns up all sorts of garbage. What is the simplest solution? (In Java 1.5) Solution Thanks to Matt McMinn, I have settled on this implementation. It has the right…
Frank Krueger
  • 69,552
  • 46
  • 163
  • 208
106
votes
4 answers

How do I convert a org.w3c.dom.Document object to a String?

I want to convert a org.w3c.dom.Document object to a String. I'm using Java 6 and am open to using any (completely free) technology that is up to the task. I tried the solution from this thread -- Is there a more elegant way to convert an XML…
Dave
  • 15,639
  • 133
  • 442
  • 830
99
votes
4 answers

Get IFrame's document, from JavaScript in main document

I have this HTML code: