when writing an xml parser in kotlin, is it a bad idea to "nest" xml parsers, so that…
Jump to turn (11)
- 1when writing an xml parser in kotlin, is it a bad idea to "nest" xml parsers, so
- 2how do i open a database and execute a query inside a function?
- 3how would this piece of code change if i had a function which adds a record to a
- 4no, i already have a function which creates a record in the database. can i use
- 5lets start over. i have a class which represents a database. inside that class,
- 6what if my database is a class inherited from SQLiteOpenHelper? wouldnt that cha
- 7how do i know what context to pass?
- 8ok, i need a consultation. i have a separate class file which stores a class rep
- 9my xml parser reads data from a file, and then puts that data inside the databas
- 10that is correct. i didnt think of it at all
- 11does calling a database constructor (SQLiteOpenHelper) every time without provid
- User
when writing an xml parser in kotlin, is it a bad idea to "nest" xml parsers, so that after parsing one value, i request a different file and read details from it before moving on to the next value?
- Assistant
It depends on the specific use case and the size of the XML files being parsed. If the XML files are relatively small and the nested parsing is necessary to retrieve all the necessary values, then it may be acceptable. However, if the XML files are larger or if there are alternative approaches to retrieving the necessary values, then it may be more efficient to avoid nesting parsers. In general, it is best to aim for a simple, streamlined parser that retrieves all the necessary values in as few steps as possible.
- User
how do i open a database and execute a query inside a function?