View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001857 | JEDI VCL | 00 JVCL Components | public | 2004-06-13 14:45 | 2004-06-21 06:17 |
Reporter | cpall | Assigned To | user72 | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0001857: TjvSimpleXML isn't quite reading my xml properly | ||||
Description | <SMART_DOCUMENT xmlns="http://www.mismo.org" xmlns:emrtg="http://www.mismo.org" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:MISMOVersionIdentifier="1.02" xmlns:PopulatingSystemDocumentIdentifier="ident"> becomes <SMART_DOCUMENT xmlns="http://www.mismo.org" xmlns:emrtg="http://www.mismo.org" xmlns:xlink="http://www.w3.org/1999/xlink" MISMOVersionIdentifier="1.02" PopulatingSystemDocumentIdentifier="DPS_3260e"> ... I haven't gotten to why yet, but it is lopping off some of the data. I will look at it but I can't make any promises as to why this is happening. | ||||
Tags | No tags attached. | ||||
|
two things, it didn't change the identifier, that was me, sorry, the part that it is "losing" is the xmlns: before the two last attributes. Thanks |
|
I created a small app with two memos, a TJvSimpleXML and a button. OnClick for button: procedure TForm1.Button1Click(Sender: TObject); begin JvSimpleXML1.LoadFromString(Memo1.Lines.Text); Memo2.Lines.Text := JvSimpleXML1.SaveToString; end; Feeding in your xml verbatim (sxoAutoEncodeValue and sxoAutoEncodeEntry set to false), gave me back: <?xml version="1.0" encoding="iso-8859-1"?> <SMART_DOCUMENT xmlns="<http://www.mismo.org>" xmlns:emrtg="<http://www.mismo.org>" xmlns:xlink="<http://www.w3.org/1999/xlink>" xmlns:MISMOVersionIdentifier="1.02" xmlns:PopulatingSystemDocumentIdentifier="ident"/> Looks OK to me... This was with v 1.36 (2004-06-11) |
2004-06-14 12:07
|
jvclXMLTroubles.zip (4,039 bytes) |
|
Silly me. It is actually adding data, not losing data... looks more like this: <SMART_DOCUMENT xmlns="http://www.mismo.org" xmlns:emrtg="http://www.mismo.org" xmlns:xlink="http://www.w3.org/1999/xlink" MISMOVersionIdentifier="1.02" PopulatingSystemDocumentIdentifier="DPS_3260e"> which gets turned into: <SMART_DOCUMENT xmlns="http://www.mismo.org" xmlns:emrtg="http://www.mismo.org" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:MISMOVersionIdentifier="1.02" xmlns:PopulatingSystemDocumentIdentifier="DPS_3260e"> I have included a working demonstration of the problem to make up for my lack of one before, thanks. Chris |
|
err... that was me :) |
|
Whoo hoo! I got the fix. Line 1893 in source taken June 18th, when we begin to read the Name for the property, we need to clear the pointer variable out as well. case lPos of ptWaiting: //We are waiting for a property begin case lBuf[I] of ' ', Tab, Cr, Lf: begin end; 'a'..'z', 'A'..'Z', '0'..'9', '-', '_': begin lName := lBuf[I]; lPos := ptReadingName; end; '/', '>', '?': begin Dec(lStreamPos); Count := 0; Break; end; else FmtError(RsEInvalidXMLElementUnexpectedCharacte, [lBuf[I]]); end; end; . . . becomes . . . case lPos of ptWaiting: //We are waiting for a property begin case lBuf[I] of ' ', Tab, Cr, Lf: begin end; 'a'..'z', 'A'..'Z', '0'..'9', '-', '_': begin lName := lBuf[I]; lPointer := ''; // cgp, clear the pointer variable here or at some point lPos := ptReadingName; end; '/', '>', '?': begin Dec(lStreamPos); Count := 0; Break; end; else FmtError(RsEInvalidXMLElementUnexpectedCharacte, [lBuf[I]]); end; end; |
|
Fixed in CVS |
Date Modified | Username | Field | Change |
---|---|---|---|
2004-06-13 14:45 | cpall | New Issue | |
2004-06-13 14:46 | cpall | Note Added: 0004547 | |
2004-06-14 01:06 |
|
Note Added: 0004550 | |
2004-06-14 01:06 |
|
Status | new => feedback |
2004-06-14 12:07 | anonymous | File Added: jvclXMLTroubles.zip | |
2004-06-14 12:08 | anonymous | Note Added: 0004554 | |
2004-06-14 12:09 | cpall | Note Added: 0004555 | |
2004-06-18 20:02 | cpall | Note Added: 0004588 | |
2004-06-21 06:17 |
|
Status | feedback => resolved |
2004-06-21 06:17 |
|
Resolution | open => fixed |
2004-06-21 06:17 |
|
Assigned To | => user72 |
2004-06-21 06:17 |
|
Note Added: 0004591 |