BASIC

Author Topic: xml parser  (Read 11087 times)

Offline phaelax

  • Mc. Print
  • *
  • Posts: 36
    • View Profile
Re: xml parser
« Reply #15 on: 2011-Feb-16 »
Now that I think about it, it shouldn't technically matter because the parser reads character by character. Still need to figure out what locks it up.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10665
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: xml parser
« Reply #16 on: 2011-Feb-16 »
Yes, 1024 characters (incl \0 character) for readline.

You can fix that with:
READLINE ...
IF LEN(line$) = 1023
 INC line$, READLINE
ENDIF


Because, once Readline detects a \n character, it removes it and also removes a \r before the \n. So if the length=1023, the \n was not there.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10665
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: xml parser
« Reply #17 on: 2011-Aug-30 »
Make a debug version, then press pause - x = INSTR() returns -1 and you assign j = x later. It's an infinite loop.
Also make sure you can handle attribute contents that can contain "=" characters.

Offline bigtunacan

  • Mr. Polyvector
  • ***
  • Posts: 195
    • View Profile
Re: xml parser
« Reply #18 on: 2011-Sep-15 »
Is the latest version of the code available somewhere?

MrTAToad

  • Guest
Re: xml parser
« Reply #19 on: 2011-Sep-15 »
I dont think the code has been updated in a while, but its on the first page.

Offline phaelax

  • Mc. Print
  • *
  • Posts: 36
    • View Profile
Re: xml parser
« Reply #20 on: 2013-Apr-28 »
At the end of august in 2011 I left for a year with the army.  If people still have an interest in this, I'll see about finishing it.

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2556
    • View Profile
Re: xml parser
« Reply #21 on: 2013-Apr-28 »
Welcome back!  ;) Funny enough I actually just got my hands on a project that uses this expensively, so any additions would be appreciated!
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)