<?xml version="1.0"?><mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><database name="test"><table_data name="test"><row><field name="field1">406</field><field name="field2">a2</field><field name="field3">16</field><field name="field4"></field><field name="field5" xsi:type="xs:hexBinary">[get the content from http://188.8.131.52/file/hex.txt path because i cannot give such a large content to stackoverflow]</field><field name="field6">16</field></row></table_data></database></mysqldump>I am trying to parse and read the content from the above xml file.I am using a DOM parser and I also tried StAX parser to parse the XML but I cannot parse such a large file.How can I parse large XML files?
DOM is not a good option for such a large files. If SAX also failing only option you have I think will be increase memory.
ya, that is why am asking friend. what will be the better approach for this one.
what error are you getting when you try to parse?
am did not get any error. but file parsing is skipped.
"file parsing is skipped" says that the parser isn't the problem, something else in your code is. If it were truly a problem of the file being too big, you'd get an OutOfMemoryError. To get better answers, post your code.
i have a question, does this SAX parser will allow to change and update the xml content?