| zxed |
| Newbie |
|
|
|
|
| None Specified |
|
| Thursday, July 16, 2009 |
| Tuesday, July 21, 2009 8:02:04 PM |
3 [0.02% of all post / 0.00 posts per day] |
|
thanks for your reply :) i tried out the sample code and added the outer elements... i think its partly lame that it doesn't see that the outer elements are there in the XML and only adds the node.prefix., im going to export a sample using the code i have and hope that the XML parsing webservice doesnt care about the prefix.. otherwise ill have to add 50-100 lines of Node.prefix.... and undo a lot of my
item.subitem.append.subitem1.append.subitem2.append.subitem3.append
and break them appart so that i can do a node.prefix for each parent node... :(
|
Thank you for the example :)
I see no problem doing that for the root node as it would need to be done just once.. but my schema imports roughly 5 others., and every single node would need its prefix, would i have to manually create the correct prefix for every node?
from the short following sample
<ext:TransactionMetadata> <ext:SubmittingAgencyORIIdentification> <nc:IdentificationID>TESTVAL</nc:IdentificationID> </ext:SubmittingAgencyORIIdentification> <ext:TransactionActionCode>NEW</ext:TransactionActionCode> <ext:TransactionDateTime> <nc:DateTime>2009-03-22T07:34:56</nc:DateTime> </ext:TransactionDateTime> <ext:TransactionSequenceIdentification> <nc:IdentificationID>AEREA</nc:IdentificationID> </ext:TransactionSequenceIdentification> </ext:TransactionMetadata>
I would need to 1. add the prefix ext to TransactionMetadata 2. add the prefix ext to SubmittingAgencyORIIdentification 3. add the prefix nc IdentificationID 4. add the prefix ext to TransactionActionCode 5. add the prefix ext to TransactionDateTime .... this would also require me to correctly add the right prefix.. by giving me control... i could have a type and make nc into nv...
no way to have it do this all automatically? :)
thank you.
|
I create the code (c#) for an XSD., when exporting a sample xml from XSD it adds the correct tags to each xml node... in the SaveToFile method.. it only adds the node with a xmlns attribute for where the node is from... and example will explain it better
example., when exporting sample xml from xmlspay i get <ext:TransactionMetadata> <ext:SubmittingAgencyORIIdentification> <nc:IdentificationID>TESTVAL</nc:IdentificationID> </ext:SubmittingAgencyORIIdentification> <ext:TransactionActionCode>NEW</ext:TransactionActionCode> <ext:TransactionDateTime> <nc:DateTime>2009-03-22T07:34:56</nc:DateTime> </ext:TransactionDateTime> <ext:TransactionSequenceIdentification> <nc:IdentificationID>AEREA</nc:IdentificationID> </ext:TransactionSequenceIdentification> </ext:TransactionMetadata>
when i use savetofile i get <TransactionMetadata> <SubmittingAgencyORIIdentification> <IdentificationID xmlns="http://niem.gov/niem/niem-core/2.0">TESTVAL</IdentificationID> </SubmittingAgencyORIIdentification> <TransactionActionCode>NEW</TransactionActionCode> <TransactionDateTime> <DateTime xmlns="http://niem.gov/niem/niem-core/2.0">2009-03-22T07:34:56</DateTime> </TransactionDateTime> <TransactionSequenceIdentification> <IdentificationID xmlns="http://niem.gov/niem/niem-core/2.0">AEREA</IdentificationID> </TransactionSequenceIdentification> </TransactionMetadata>
is it possible to have the generated code export xml as the first example? where instead of schema location, it uses the name with the tag?
|
|