At Thu, 12 Oct 2017 15:12:21 -0700 (PDT)
atomi...@gmail.com wrote:
>
> I'm running into a bit of a weird problem. It looks like I cannot assign a =
> variable with more than 600 lines (regardless of line length). It seems to =
> bail part way through the assignment and start interpreting the excess line=
> s as additional commands.
>
> Stepping back a bit:
> The reason I'm doing this is I'm using tDOM to parse a very large XML file.=
> So following some of the examples, I first set a variable to be the conten=
> ts of the XML file. e.g.
>
> set XML "
> <order number=3D'1'>
> <customer>John Doe</customer>
> <phone>555-4321</phone>
> <email>
jd...@example.com</email>
> <website/>
> <parts>
> <widget sku=3D'XYZ123' />
> <widget sku=3D'ABC789' />
> </parts>
> </order>
> "
Are you actually using double quotes? Did you try it with braces instead?
I'm wondering if somewhere a double quote actually occurs in the XML
somewhere. This will seriously break things.
Double quote is a legal XML character. Even though in your example it is
showing single quotes (also legal), there might be double quote somewhere in
there that you might have missed.
>
> This is the simple example on the Tcl.Tk wiki and when I replace it with my=
> own simple example XML with a few items, it works fine. When I use the ful=
> l blown XML which is hundreds of lines long, it fails. I finally figured ou=
> t the issue was the 600 line limit, so I replaced all the LF and CR in the =
> XML file so it is one giant line and everything worked fine.
>
> This seems like a dumb way to do things and it isn't going to work when I g=
> o for the full-blown production XML which spans I think 100,000 lines or mo=
> re.
>
> Is there a better way to tackle this problem?
> I'm using ActiveTcl 8.5.11 on Windows 10 machine
>
--
Robert Heller --
978-544-6933
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
hel...@deepsoft.com -- Webhosting Services