Wednesday, November 2, 2016

Upload XML data to MySQL or NoSQL

DefaultHandler UploadFileString //read servlet input GoogleSaveRestoreTypes SqlSaveRestoreTypes CreateRestoreTypes RestoreXmlHandler parameter SAXParser RestoreXML - Google Datastore RestoreXML - MySQL db connection data cache RestoreXml environment UploadFile servlet HttpServlet class reference diagram draw diagrams logically from specification Use the specification to generate/inject objects UploadFileString: getUploadedFile new RestoreXmlHandler data store: getLists SaveRestoreTypes: save data store: add CreateRestoreTypes: createType saxParser.parse(handler) RestoreXML:execute UploadFile:processRequest control flow append buf value to current refvar value characters current typename = element name yes no current typename is null current refvar = element name no yes root element is null root element = element startElement //input record format <Typename> <Refvar>refvalue</Refvar> .... </Typename> build current typename record clear refvar value map set current typename null yes no element name is current typename error no yes element is root element save the data endElement saxParser handler api

No comments:

Post a Comment