View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002652 | JEDI VCL | 00 JVCL Components | public | 2005-02-17 16:30 | 2005-02-19 06:17 |
Reporter | jeges | Assigned To | user72 | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | |||||
Target Version | Fixed in Version | 3.00 | |||
Summary | 0002652: TJvSimpleXml namespace problem at end tag | ||||
Description | Hello! I have used this component to parse an xml file that I got from the Java standard xml creator. I encountered a problem parsing the following types of xml elements: <someNamespace:MyTag>blahblah</someNamespace:MyTag> The TJvSimpleXml component only accepts the following type of tags: <someNamespace:MyTag>blahblah</MyTag> IMHO the first form should be valid, based on the Java generated xmls. | ||||
Tags | No tags attached. | ||||
|
It is a bug. Try commenting out the ':' case handler in TJvSimpleXMLElemClassic.LoadFromStream and see if that resolves it. NB! Not tested extensively, so might have other, unknown, negative side-effects |
2005-02-18 09:24
|
JvSimpleXml_good.pas (91,055 bytes) |
|
I worked on it today and it looks like I solved the problem. I attached the file to the issue. I noticed that, when creating the xml stream it doesn't adds the namespaces (called pointers in the code) also. If you find it useful and solid commit it in. Diffs: - TJvSimpleXMLElemClassic.SaveToStream adds the (namespace + ':') characters before tagname - TJvSimpleXMLElems.LoadFromStream saves in a local variable the namespace and when the tag is finished it returns (namespace + ':' + tagname) to TJvSimpleXMLElemClassic.LoadFromStream - TJvSimpleXMLElemClassic.LoadFromStream validates the returned end tag namespace and tagname to the elements namespace and tagname That's all. PS. Sorry about the double attachment. I couldn't delete the first, which was an older "under construction" version sadly uploaded. The file containing the solution is the "JvSimpleXml_good.pas" which should be of course renamed to "JvSimpleXml.pas". If you have the rights please delete the old one :) |
|
Have you tested your changes with xml files that doesn't have namespace prefixed tags? I suspect not. |
|
A slightly modified version has been posted to CVS where the value of the prefix is checked before adding the ':'. Also includes a fix for CDATA sections that has white space between the CDATA and the last [. This is allowed. |
Date Modified | Username | Field | Change |
---|---|---|---|
2005-02-17 16:30 | jeges | New Issue | |
2005-02-18 01:38 |
|
Note Added: 0006512 | |
2005-02-18 01:38 |
|
Status | new => feedback |
2005-02-18 08:57 | anonymous | File Added: JvSimpleXml.pas | |
2005-02-18 09:24 | anonymous | File Added: JvSimpleXml_good.pas | |
2005-02-18 09:32 | anonymous | Note Added: 0006519 | |
2005-02-18 11:06 | anonymous | Note Deleted: 0006519 | |
2005-02-18 11:06 | jeges | Note Added: 0006523 | |
2005-02-19 05:03 |
|
File Deleted: JvSimpleXml.pas | |
2005-02-19 05:13 |
|
Note Added: 0006524 | |
2005-02-19 06:17 |
|
Status | feedback => resolved |
2005-02-19 06:17 |
|
Resolution | open => fixed |
2005-02-19 06:17 |
|
Assigned To | => user72 |
2005-02-19 06:17 |
|
Note Added: 0006527 |