Harm Bandstra
2007-11-09 20:16:33 UTC
Hello All,
I'm not sure if this is the right place for my question, but here
goes...
I have an XSD file with properties containing hyphens. I can't get it
to accept any changes to the properties. In part this is because php
doesn't accept hypens in variable names, but I found that "Simple-XML"
uses some sort of work around. I have the following php code:
===
$xmldas = SDO_DAS_XML::create('xsd/pre_qual_wso.xsd');
$messagebody = $xmldas->createDataObject('','MessagebodyType');
// This gives a syntax error (duh)
$messagebody->portfolio-id = 'BST';
// These 2 give the following error:
// Problem creating an XML document: DataObjectImpl::setSDOValue -
path not found:
$messagebody['portfolio-id'] = 'BST';
$messagebody[0] = 'BST';
// This is the way it's done in simple-xml, but also doesn't work
$messagebody->{'portfolio-id'} = 'BST';
===
Can it be done? Any help will be appreciated.
Kind regards,
Harm Bandstra
I'm not sure if this is the right place for my question, but here
goes...
I have an XSD file with properties containing hyphens. I can't get it
to accept any changes to the properties. In part this is because php
doesn't accept hypens in variable names, but I found that "Simple-XML"
uses some sort of work around. I have the following php code:
===
$xmldas = SDO_DAS_XML::create('xsd/pre_qual_wso.xsd');
$messagebody = $xmldas->createDataObject('','MessagebodyType');
// This gives a syntax error (duh)
$messagebody->portfolio-id = 'BST';
// These 2 give the following error:
// Problem creating an XML document: DataObjectImpl::setSDOValue -
path not found:
$messagebody['portfolio-id'] = 'BST';
$messagebody[0] = 'BST';
// This is the way it's done in simple-xml, but also doesn't work
$messagebody->{'portfolio-id'} = 'BST';
===
Can it be done? Any help will be appreciated.
Kind regards,
Harm Bandstra