Xml Deserialization problem. Schema or namespaces in xml are missing.
Will try my superbest to explain it in details... There is a third-party web service, that returns XML like this: 1 <AvailabilityResult size='8'>
2 <CarAvailability>
3 <supplierType>W</supplierType>
4 <hasAirConditioning>true</hasAirConditioning>
5 <priority>10</priority>
6 <lineNumber>04</lineNumber>
7 <companyCode>AL</companyCode>
8 <companyName>ALAMO</companyName>
9 <vehicleTypeCode>SCAR</vehicleTypeCode>
10 ...
Delphi 7 to Delphi XE: TBlobField to XML [Edit]Hi,
I'm migrating a Delphi7 application to Delphi XE.
I'm using a TClientDataSet to communicate, by using a XML frame, with my server.
In this TClientDataSet I'm using a TBlobField which is an array of 384 byte.
The blobField is allocate by a code like this :
{code}
myStream : TStream;
myStream := aClientDataSet.CreateBlobStream(myBlobField, bmwrite);
vResult := myStream.Write(ArrayOf384Byte[0], length(ArrayOf384Byte)); //vResult = 384 => GooD !
(...)
{code}
For communicate with the server, we have to decode the Blobfield in XML before to sending it.
We have...
Prefixes and Namespaces are missingHello everbody, i had to use the xml data binding wizard and generated a unit of my XSD File. My XSD Schema also include other xsd files.
{code}
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bew="http://www.vdek.com/xml-schema/BEW/1.7" xmlns:auf="http://www.vdek.com/xml-schema/AUFN/1.6" xmlns:rec="http://www.vdek.com/xml-schema/RECH/1.4" xmlns:ent="http://www.vdek.com/xml-schema/ENTL/1.5" xmlns:ebe="http://www.vdek.com/xml-schema/EBE/1.4" xmlns:atv="http://www.vdek.com/xml-schema/ATV/1.5" xmlns:aav=&quo...
Namespace prefixes during XML serialization
Hi everyone I'm having a bit of trouble generating namespace prefixes when I serialize objects to XML, I've got a class: [XmlRoot(ElementName = "ZeroFarePass", Namespace = "http://www.sypte.co.uk")]
public class ZeroFarePassRequest : BMBCType
{
private string _ApplicationYear = String.Empty;
private string _UniquePupilNumber = String.Empty;
[XmlElement("ApplicationYear")] public string ApplicationYear { get { return _ApplicationYear; } set { _ApplicationYear = value; } } [XmlElement("UniquePupil...
XML Viewer missing namespaces
I have XML held in an XML field in sql server an i want to display it in a nice friendly way in part of a page.
I am using the XML control and applying XSLT: defaultss.xslt the standard one used by internet explorer so it looks nice.
The problem is i am losing my <?xml version="1.0" encoding="utf-16" ?> declaration at the top and also all namespace declarations throughout the message. I really need the message to look as is in the database with no info being hidden/lost,
Can anyone help?! Scratching my head with this one for days!
Hi nickster,
You c...
XML Serialization and namespace prefixes
Hello,I'm finding myself in the situation where I can't serialize with the attribute-based default serialization, so I had to implement the IXmlSerializable interface. Now that works, but when I serialize the object to XML, I don't get any namespace prefixes, even though they are defined when calling the XmlSerializer.Serialize method (using the namespaces parameter). I tried using writer.LookupPrefix(MyNamespace) in my WriteXml method but kept returning the empty string. Back when I used default attribute-based serialization, the namespace aliases were outputted correctly. I nee...
Xml declaration + Add Namespace Prefix
Hello,
I'm writing a webservice to support the tr-069 protocol. Methods are implemented and the incoming requests are processed.
But the response sent by my webservice to the CPE are incorrect, it's not as described in the official documentation tr-069.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema%22%3E">
<soap:Header><ID soap:mustUnderstand="1" xmlns="urn:dslforum-org:cwmp-1-0">13_T...
XML Data binding and multiple namespaces [Edit]I have used Delphi XE2 and the XML Data binding tool. I have trouble parsing a XML document containing several namespaces, e.g.
<ns: Content>
<ns1:SubContent xmlns:ns1="http://...">
<ns1:Date>2012-05-08Z</ns1:Date>
</ns: Content>
(only the relevant part of the XML)
The binding code was generated from a valid XML-schema using the ns namespace importing another one with the ns1 namespace.
Also refer to https://forums.embarcadero.com/thread.jspa?threadID=64760 (another thread on this forum).
I managed to follow the recipe in that tread and m...
Missing icons in Delphi 2010 palette... SOLVED [Edit]Hello All,
As a Delphi user since Delphi 1 I was keen to re-simplify the ui and put the component palette back in it's original position.
I have installed RAD Studio 2010 on a new Windows 7 64 bit machine, it's a clean untouched installation. Sadly some of the component tabs contain components with the default glyph, which makes identifying them 'interesting'.
Has anyone else seen this behaviour? Is there a fix for it at which you can point me, please?
Broken images are on the following tabs:-
Windows 3.1
BDE
Rave
Ribbon Controls
Servers
Samples (up to and...
Delphi XE2 is missing TDirectoryListbox and TDriveComboBox components? [Edit]My Delphi XE2 is completely missing the Win 3.1 tab with all its components?
Is this correct??
I have projects that use the TDirectoryListbox, TDriveComboBox and TFileListBox.
Is my Delphi XE2 installation corrupt??
Thank you in advance for any advice.
Edited by: Wouter Oosthuizen on Oct 7, 2011 6:54 AM
Edited by: Wouter Oosthuizen on Oct 7, 2011 7:12 AM
No need to reply.
It seems that I had a corrupt installation.
I performed a Repair and now my XE2 has the Win 3.1 tab and components.
Thank you.
...
XML, RTTI-based serialization for Delphi 7? [Edit]Using Delphi 7.
Trying to export a tcollection of data to XML to load later.
I've used the JVCL, NativeXML, and OmniXML.
So far OmniXML has worked the best.. its ALMOST there...but since it looks discontinued.. and OXML doesn't have this feature yet..
Only issue I have with OmniXML.. is each tcollection item, has a smaller object inside them.
Everything else saves/loads fine.. but I really need the smaller object inside those to save out also.
Any one have any ideas on this?
NativeXML looked promising, but it gets AV errors trying to save my tcollection object.
...
Nested XSD with Delphi XML Binding Wizard [Edit]Hi *,
I use the XML Binding Wizard to parse xml files conform to the +nSUiDialogDescription.xsd+ file. Now I whant to parse new xml files conform to +nsUiDialogDriverConfiguration.xsd+ which includes the +nSUiDialogDescription.xsd+ file. Sadly it seems that the XML Binding Wizzard ignores nested types in the +nSUiDialogDescription.xsd+.
The test project containing the xsd files and the generated pas files can be downloaded here: https://www.stepoverinfo.net/download.php?file=xsdTest.zip.
It has been tested with Delphi XE2 and XE3 with the same results.
Is there a possibility of fi...
OfficeXP AutomationHello,
we had used the OfficeXP Automation Components in older Delphi Version. We uses for example the TItem Component, but in Delphi XE2 I don't find this (and other components) and so I'm not able to open or compile the project. The component List of the Office XP Automation Server was in Delphi XE much larger.
What can I do to solve this problem?
Best wishes
Bernhard
Edited by: Registered User on May 10, 2012 6:14 AM
> What can I do to solve this problem?
What if you install the Office 2000 packages instead of Office XP?
(menu-component-install packages : uncheck Off...
delphi 2007 xml data binding. problems with namespaces.I tried to import an xml schema with XML Data Bindind (Delphi 2007),
but i have a problem with namespaces.
The namespace is written before every element, and not only before the
root element.
I obtain these code:
<?xml version="1.0"?>
<ns2:CodeList
xmlns:ns2="http://docs.oasis-open.org/codelist/ns/genericode/1.0/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://docs.oasis-open.org/codelist/ns/genericode/
1.0/
http://docs.oasis-open.org/codelist/genericode/xsd/genericode.xsd">
<ns2:Identifi...