document « XML file « Java I/O Q&A





1. Can I create an XML document from dtd file in Java?    stackoverflow.com

I have a simple DTD file with elements and attributes specifications. Can i create a suitable XML file (with DOM) parsing this DTD with Java and no external APIs? Thanks in ...

2. How to efficiently parse concatenated XML documents from a file    stackoverflow.com

I have a file that consists of concatenated valid XML documents. I'd like to separate individual XML documents efficiently. Contents of the concatenated file will look like this, thus the concatenated file ...

3. Replacing XML in File from "Document" in Java    stackoverflow.com

after processing my first steps in working with XML in java I am now at the point where I want to update some data in my XML/GPX file... Reaplacing it in my ...

4. Parse a badly formatted XML document (like an HTML file)    stackoverflow.com

After the parse, I would like to remove dangerous code and write it out again properly formatted. The purpose is to prevent scripts from entering through an email but still allow the ...

5. How to save parsed and changed DOM document in xml file?    stackoverflow.com

I have xml-file. I need to read it, make some changes and write new changed version to some new destination. I managed to read, parse and patch this file (with DocumentBuilderFactory, DocumentBuilder, ...

6. Need to find corrupt document(docx file format)    stackoverflow.com

I am using xslt to convert my html to docx file format(which is in open office xml format). When i open some generated docx file in word, its showing error(may be ...

7. How to put String text without converting content to xml file in Java?    stackoverflow.com

I need to put String content to xml in Java. I use this kind of code to insert information in xml:

Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new File ("file.xml"));
DOMSource source = new DOMSource (doc);

Node ...

8. How to parse multiple, consecutive xml files in one document?    stackoverflow.com

I have a big text file that is a sequence of XML-valid documents that looks something like this:

<DOC>
   <TEXT> ... </TEXT>
    ...
</DOC>
<DOC>
    <TEXT> ...

9. Error writing XML Document to file in Java    stackoverflow.com

I am trying to write org.w3c.dom.Document to a file. I get the Document from

String URL = "http://...."
DOMParser parser = new DOMParser();
Document doc = null;
try {
    parser.parse(new InputSource(URL));
  ...





10. Saving a styled document to XML file    forums.oracle.com

11. CONVERTING XML FILES TO WORD DOCUMENT    forums.oracle.com

12. Parsing an XML document from a string - not a file    forums.oracle.com

Hello, I was wondering if it is possible to parse XML using dom, where the input XML is a string, and not an actual file. I was hoping to be able to bypass creating a file. So like String xmlDoc = "

13. Document object of xml file question.    forums.oracle.com

14. use xml file to create a word/pdf document    forums.oracle.com

Without knowing any details, I would guess that you have a couple of options; Parse the xml using SAX or some similar tool and use the data recovered to create the document using an existing API; HWPF for example would allow you to create a simple Word documnet or, if you were much braver, you could use the SWT to 'drive' ...