Message-ID: <49DBE657.1050008@ist.utl.pt>
Nick MacDonald wrote:
> Krishna:
>
> I'm afraid you're fighting a losing battle... You're trying to use the wrong tool. I have never looked into XHTML, put my gut instinct tells me it would be an valid XML expression of HTML... and that is where you need to go if you wish to continue to use eXpat as you're currently attempting.
Nick is absolutely right. XHTML is essentially well formed HTML, which
means much more elegant but also a bit more restrictive, particularly
for beginners (particularly if you use XHTML 1.0 Strict, you might
prefer a less restrictive specification).
So everything comes down to the question: how much control do you have
over these HTML files? if you are starting a new project where HTML
files are controled by you, I strongly suggest XHTML, which is sooo much
better than plain HTML. In a perfect world all HTML files would be
XHTML. If HTML files come from someone else, or exist already, then
forget Expat.
Regards,
C
From lee at novomail.net Thu Apr 9 00:00:36 2009
From: lee at novomail.net (Lee Passey)
Date: Wed, 08 Apr 2009 16:00:36 -0600
Subject: [Expat-discuss] not well-formed (invalid token) error
In-Reply-To: <511993.58387.qm@web111507.mail.gq1.yahoo.com>
References: <511993.58387.qm@web111507.mail.gq1.yahoo.com>
Message-ID: <49DD1E84.8090604@novomail.net>
Krishna Kondaka wrote:
> Hi
>
> I am trying to parse a very simple HTML file but I am getting 'not
> well-formed (invalid token) error'. Is there any thing I can do to
> make this work without getting errors?
Yes, you can convert your HTML file to XHTML.
Expat is an XML parser. HTML is /not/ XML; rather HTML is based on SGML
syntax. SGML allows for certain tags to be implicitly closed. For
example, in HTML this is allowed:
This is a paragraph
This is another paragraph
In HTML, when a
is encountered, it /implicitly/ closes any open
tag.
XHTML is an implementation of HTML with the additional restriction that
not only must the markup be valid HTML it must also be well-formed XML
as well. So the foregoing HTML snippet must be encoded in XHTML as:
This is a paragraph
This is another paragraph
Note the addition of the closing tags.
Also, HTML has a few tags that are self-contained ("empty"), and contain
no closing tags. Among these tags are ,
and
. In XML,
however, closing tags must be explicit so the syntax for these empty
tags uses a slash prior to the final angle bracket.
You example is valid HTML, but it is not valid XHTML, because the
tag is not closed; use
instead.
If you do not control your HTML, you can use a tool like HTMLTidy
(http://tidy.sourceforge.net/) to convert valid (and sometimes invalid)
HTML to XHTML.
From Srikanth.Kanchari at NIIT-Tech.com Mon Apr 6 10:32:33 2009
From: Srikanth.Kanchari at NIIT-Tech.com (Srikanth Kanchari)
Date: Mon, 6 Apr 2009 14:02:33 +0530
Subject: [Expat-discuss] Trouble using static expat in MS VS2005
Message-ID: <68A1D2CD23A08A4C97FF0E17D444E8DDD5B3B4490D@NOIDA-CH-MSG.IN.NIIT-Tech.com>
Hi,
I have to use the Static library of Expat.
I have downloaded expat-2.0.1
I want to use the expat_static,
I had compiled the files in Visual studio 6.0 and trying to use the Lib in one more static library which I have created.
But the library is compiled but the Link error:
1>------ Build started: Project: ExcelXmlLib, Configuration: Release Win32 ------
1>Creating library...
1>Build log was saved at "file://d:\Library\Static\ExcelXmlLib\ExcelXmlLib\Release\BuildLog.htm"
1>ExcelXmlLib - 0 error(s), 0 warning(s)
2>------ Build started: Project: TestClient, Configuration: Release Win32 ------
2>Linking...
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external symbol __imp__XML_SetUserData
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external symbol __imp__XML_ParserCreate
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external symbol __imp__XML_Parse
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external symbol __imp__XML_GetErrorCode
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external symbol __imp__XML_ErrorString
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external symbol __imp__XML_SetCharacterDataHandler
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external symbol __imp__XML_SetElementHandler
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external symbol __imp__XML_ParserFree
2>D:\Library\Static\ExcelXmlLib\Release\TestClient.exe : fatal error LNK1120: 8 unresolved externals
2>Build log was saved at "file://d:\Library\Static\ExcelXmlLib\TestClient\Release\BuildLog.htm"
2>TestClient - 9 error(s), 0 warning(s)
Could you please suggest, how to use the libexpatMT.lib
Regards,
Srikanth Kanchari
________________________________
DISCLAIMER
The content of this email and any attachments ('email') is confidential, may be privileged, subject to copyright and may be read and used only by the intended recipient. If you are not the intended recipient please notify us by return email or telephone and erase all copies and do not disclose the email or any part of it to any person. Email transmission cannot be guaranteed to be secure, or error free as information could be intercepted, corrupted, lost or destroyed as a result of the transmission process. The sender, therefore, does not accept liability for any errors, omissions, viruses or delay in transmission as a result of this mail. We monitor email communications through our networks for regulatory compliance purposes and to protect our clients, employees and business. Opinions, conclusions, and other information in this message that do not relate to the official business of NIIT Technologies Ltd. or its affiliate(s) shall be understood to be neither given nor endorsed by NIIT Technologies Ltd. or its affiliate(s).
From tyounger at questertangent.com Thu Apr 9 17:39:38 2009
From: tyounger at questertangent.com (tyounger at questertangent.com)
Date: Thu, 9 Apr 2009 08:39:38 -0700
Subject: [Expat-discuss] Trouble using static expat in MS VS2005
In-Reply-To: <68A1D2CD23A08A4C97FF0E17D444E8DDD5B3B4490D@NOIDA-CH-MSG.IN.NIIT-Tech.com>
Message-ID:
That was my initial question when I started using Expat.
Here is the correct reply from Karl:
For static linking you need to define a specific symbol.
If I remember correctly it is XML_STATIC.
---
Tom Younger, B.Sc.
Lead Engineer, Marine Division
Quester Tangent
(250) 654-3316
Srikanth Kanchari
To
Sent by: "expat-discuss at libexpat.org"
expat-discuss-bou
nces+tyounger=que cc
stertangent.com at l
ibexpat.org Subject
[Expat-discuss] Trouble using
static expat in MS VS2005
04/06/2009 01:32
AM
Hi,
I have to use the Static library of Expat.
I have downloaded expat-2.0.1
I want to use the expat_static,
I had compiled the files in Visual studio 6.0 and trying to use the Lib in
one more static library which I have created.
But the library is compiled but the Link error:
1>------ Build started: Project: ExcelXmlLib, Configuration: Release Win32
------
1>Creating library...
1>Build log was saved at "
file://d:\Library\Static\ExcelXmlLib\ExcelXmlLib\Release\BuildLog.htm"
1>ExcelXmlLib - 0 error(s), 0 warning(s)
2>------ Build started: Project: TestClient, Configuration: Release Win32
------
2>Linking...
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external
symbol __imp__XML_SetUserData
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external
symbol __imp__XML_ParserCreate
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external
symbol __imp__XML_Parse
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external
symbol __imp__XML_GetErrorCode
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external
symbol __imp__XML_ErrorString
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external
symbol __imp__XML_SetCharacterDataHandler
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external
symbol __imp__XML_SetElementHandler
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external
symbol __imp__XML_ParserFree
2>D:\Library\Static\ExcelXmlLib\Release\TestClient.exe : fatal error
LNK1120: 8 unresolved externals
2>Build log was saved at "
file://d:\Library\Static\ExcelXmlLib\TestClient\Release\BuildLog.htm"
2>TestClient - 9 error(s), 0 warning(s)
Could you please suggest, how to use the libexpatMT.lib
Regards,
Srikanth Kanchari
________________________________
DISCLAIMER
The content of this email and any attachments ('email') is confidential,
may be privileged, subject to copyright and may be read and used only by
the intended recipient. If you are not the intended recipient please notify
us by return email or telephone and erase all copies and do not disclose
the email or any part of it to any person. Email transmission cannot be
guaranteed to be secure, or error free as information could be intercepted,
corrupted, lost or destroyed as a result of the transmission process. The
sender, therefore, does not accept liability for any errors, omissions,
viruses or delay in transmission as a result of this mail. We monitor email
communications through our networks for regulatory compliance purposes and
to protect our clients, employees and business. Opinions, conclusions, and
other information in this message that do not relate to the official
business of NIIT Technologies Ltd. or its affiliate(s) shall be understood
to be neither given nor endorse
d by NIIT Technologies Ltd. or its affiliate(s).
_______________________________________________
Expat-discuss mailing list
Expat-discuss at libexpat.org
http://mail.libexpat.org/mailman/listinfo/expat-discuss
From winning.com at gmail.com Sun Apr 12 02:08:03 2009
From: winning.com at gmail.com (Sebastian Balazote)
Date: Sat, 11 Apr 2009 21:08:03 -0300
Subject: [Expat-discuss] XML_ERROR_INVALID_TOKEN
Message-ID: <232497540904111708w78bc9c3aoc02e2d128176baf2@mail.gmail.com>
Hi everyone! i write cause i've a problem parsing a wikipedia xml dump.
XML_Parse returns error and when i use XML_GetErrorCode i get error n?4
which means something like: "XML_ERROR_INVALID_TOKEN not well-formed"
The head of the wikipedia dump begins like: "
Wikipedia"
My question if i've to validate this with and schema (XSd) or if any of you
know how to bypass this error cause it doesnt seem to parse nothing.
THx in Advance!
From Srikanth.Kanchari at NIIT-Tech.com Tue Apr 14 08:27:13 2009
From: Srikanth.Kanchari at NIIT-Tech.com (Srikanth Kanchari)
Date: Tue, 14 Apr 2009 11:57:13 +0530
Subject: [Expat-discuss] Trouble using static expat in MS VS2005
In-Reply-To:
References: <68A1D2CD23A08A4C97FF0E17D444E8DDD5B3B4490D@NOIDA-CH-MSG.IN.NIIT-Tech.com>
Message-ID: <68A1D2CD23A08A4C97FF0E17D444E8DDD5B3DC1F0E@NOIDA-CH-MSG.IN.NIIT-Tech.com>
Hi,
When I provided the XML_STATIC in the Preprocessor Definitions it worked fine.
I think this had resolved the problem.
Thanks for your support.
Regards,
Srikanth Kanchari
Srikanth.kanchari at gmail.com
-----Original Message-----
From: tyounger at questertangent.com [mailto:tyounger at questertangent.com]
Sent: Thursday, April 09, 2009 9:10 PM
To: Srikanth Kanchari
Cc: expat-discuss at libexpat.org; expat-discuss-bounces+tyounger=questertangent.com at libexpat.org
Subject: Re: [Expat-discuss] Trouble using static expat in MS VS2005
That was my initial question when I started using Expat.
Here is the correct reply from Karl:
For static linking you need to define a specific symbol.
If I remember correctly it is XML_STATIC.
---
Tom Younger, B.Sc.
Lead Engineer, Marine Division
Quester Tangent
(250) 654-3316
Srikanth Kanchari
To
Sent by: "expat-discuss at libexpat.org"
expat-discuss-bou
nces+tyounger=que cc
stertangent.com at l
ibexpat.org Subject
[Expat-discuss] Trouble using
static expat in MS VS2005
04/06/2009 01:32
AM
Hi,
I have to use the Static library of Expat.
I have downloaded expat-2.0.1
I want to use the expat_static,
I had compiled the files in Visual studio 6.0 and trying to use the Lib in
one more static library which I have created.
But the library is compiled but the Link error:
1>------ Build started: Project: ExcelXmlLib, Configuration: Release Win32
------
1>Creating library...
1>Build log was saved at "
file://d:\Library\Static\ExcelXmlLib\ExcelXmlLib\Release\BuildLog.htm"
1>ExcelXmlLib - 0 error(s), 0 warning(s)
2>------ Build started: Project: TestClient, Configuration: Release Win32
------
2>Linking...
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external
symbol __imp__XML_SetUserData
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external
symbol __imp__XML_ParserCreate
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external
symbol __imp__XML_Parse
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external
symbol __imp__XML_GetErrorCode
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external
symbol __imp__XML_ErrorString
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external
symbol __imp__XML_SetCharacterDataHandler
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external
symbol __imp__XML_SetElementHandler
2>excelxmllib.lib(XMLLoader.obj) : error LNK2001: unresolved external
symbol __imp__XML_ParserFree
2>D:\Library\Static\ExcelXmlLib\Release\TestClient.exe : fatal error
LNK1120: 8 unresolved externals
2>Build log was saved at "
file://d:\Library\Static\ExcelXmlLib\TestClient\Release\BuildLog.htm"
2>TestClient - 9 error(s), 0 warning(s)
Could you please suggest, how to use the libexpatMT.lib
Regards,
Srikanth Kanchari
________________________________
DISCLAIMER
The content of this email and any attachments ('email') is confidential,
may be privileged, subject to copyright and may be read and used only by
the intended recipient. If you are not the intended recipient please notify
us by return email or telephone and erase all copies and do not disclose
the email or any part of it to any person. Email transmission cannot be
guaranteed to be secure, or error free as information could be intercepted,
corrupted, lost or destroyed as a result of the transmission process. The
sender, therefore, does not accept liability for any errors, omissions,
viruses or delay in transmission as a result of this mail. We monitor email
communications through our networks for regulatory compliance purposes and
to protect our clients, employees and business. Opinions, conclusions, and
other information in this message that do not relate to the official
business of NIIT Technologies Ltd. or its affiliate(s) shall be understood
to be neither given nor endorse
d by NIIT Technologies Ltd. or its affiliate(s).
_______________________________________________
Expat-discuss mailing list
Expat-discuss at libexpat.org
http://mail.libexpat.org/mailman/listinfo/expat-discuss
DISCLAIMER
The content of this email and any attachments ('email') is confidential, may be privileged, subject to copyright and may be read and used only by the intended recipient. If you are not the intended recipient please notify us by return email or telephone and erase all copies and do not disclose the email or any part of it to any person. Email transmission cannot be guaranteed to be secure, or error free as information could be intercepted, corrupted, lost or destroyed as a result of the transmission process. The sender, therefore, does not accept liability for any errors, omissions, viruses or delay in transmission as a result of this mail. We monitor email communications through our networks for regulatory compliance purposes and to protect our clients, employees and business. Opinions, conclusions, and other information in this message that do not relate to the official business of NIIT Technologies Ltd. or its affiliate(s) shall be understood to be neither given nor endorsed by NIIT Technologies Ltd. or its affiliate(s).
From darshanmody at yahoo.com Wed Apr 15 22:57:30 2009
From: darshanmody at yahoo.com (darshan mody)
Date: Wed, 15 Apr 2009 13:57:30 -0700 (PDT)
Subject: [Expat-discuss] XML document with no carriage return
Message-ID: <154333.8588.qm@web56205.mail.re3.yahoo.com>
Hi All,
Does expat parse the complete XML document when there is no carriage return? The XML document is in a single line.
Thanks,
Darshan
From Mark.Williams at techop.co.uk Mon Apr 20 10:07:23 2009
From: Mark.Williams at techop.co.uk (Mark Williams)
Date: Mon, 20 Apr 2009 09:07:23 +0100
Subject: [Expat-discuss] XML document with no carriage return
In-Reply-To: <154333.8588.qm@web56205.mail.re3.yahoo.com>
References: <154333.8588.qm@web56205.mail.re3.yahoo.com>
Message-ID:
> Does expat parse the complete XML document when there is no
> carriage return? The XML document is in a single line.
Yes.
Mark.
From gustavo at wit-software.com Fri Apr 24 16:06:08 2009
From: gustavo at wit-software.com (Gustavo Felisberto)
Date: Fri, 24 Apr 2009 15:06:08 +0100
Subject: [Expat-discuss] Problem with wchar in Linux
Message-ID: <49F1C750.5060400@wit-software.com>
Hello, I'm having problems with wchar in Linux. I've built expat with:
./configure --prefix=/home/humpback/bin/expat CFLAGS="-g -O2
-fshort-wchar" CPPFLAGS="-DXML_LARGE_SIZE -DXML_UNICODE_WCHAR_T"
--disable-shared --enable-static
make buildlib LIBRARY=libexpatwf.la
make installlib LIBRARY=libexpatwf.la
I then modified one of the samples provided in expat and built (source is attached):
g++ -DXML_LARGE_SIZE -DXML_UNICODE_WCHAR_T -O0 -g3 -Wall -c
-fmessage-length=0 -MMD -MP -MF"expattests.d" -MT"CPPTestes.d"
-o"expattests.o" "expattests.cpp"
g++ -L/home/humpback/bin/expat/lib -o"expattests" expattests.o -lexpatwf
When i run the resulting code I get errors in printf because the data is
not valid. Can someone help me?
--
Gustavo Felisberto.
WIT-Software, Lda
Coimbra (Portugal), San Jose (California)
Phone: +351239801030
Web: http://www.wit-software.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: expattests.cpp
Type: text/x-c++src
Size: 1289 bytes
Desc: not available
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL:
From pankaj.munjal at gmail.com Tue Apr 28 09:10:46 2009
From: pankaj.munjal at gmail.com (Pankaj Munjal)
Date: Tue, 28 Apr 2009 12:40:46 +0530
Subject: [Expat-discuss] Expat for Brew?
Message-ID:
Hello all,
Can Expat be used for Brew?
I see a few threads in Brew forum saying that a lot of people starting
porting expat on Brew, but ran into a lot of issues and had to use
some other XML parser instead.
Has anyone here tried to run some application using expat on BREW?
Cheers,
Pankaj
--
All the desirable things in life are either illegal, expensive,
fattening, or married to someone else!!