[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Need some advice from an XML expert

  • From: "J Siatkowski" <jason.siatkowski@g...>
  • To: xml-dev@l...
  • Date: Tue, 20 Mar 2007 11:55:43 -0400

Need some advice from an XML expert
I've done a lot of reading lately about XML as I've never really had
to work with it, but I've been tasked with developing an XML upload
for the business I support. I'm really surprised at the complexities.

Currently, I have the XML upload completed and it's working with the
various test files that I've created. I developed an XML schema and I
load the test file into a dataset once it passes validation.

There are a couple of things that I don't like about it though, and
I'm wondering if I can make this process better.

For one, I'm not happy with the fact that the xml file needs so much
information regarding namespaces.

This is what the top section of my XML file looks like:

<?xml version="1.0" encoding="utf-8"?>
<n:Transactions
xmlns:n="dsTransaction"
xmlns:mstns="http://tempuri.org/dsTransaction.xsd"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:codegen="urn:schemas-microsoft-com:xml-msprop"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="dsTransaction.xsd">

I don't see why the customers should have to include this stuff in their files.
They would need all those lines and then prefix all of their elements as below.
A single transaction sample is as follows:

<n:WireTransfers>
     <n:WireTransfer>
          <n:Value_Date>2007-02-15</n:Value_Date>
          <n:Amount>22222.33</n:Amount>
          <n:Bank_Action>R</n:Bank_Action>
          <n:Date_Blocked_Rejected>2007-02-15</n:Date_Blocked_Rejected>
          <n:Wire_Transfer_Transaction_Type>Bank to
Bank</n:Wire_Transfer_Transaction_Type>
           <other elements>
     </n:WireTransfer>
<n:/WireTransfers>

It seems to me that when the file is uploaded, I should be able to
validate the file against any schema I like. Does this sound right?
Could I take an XML file that looks like this:

<?xml version="1.0" encoding="utf-8"?>
<WireTransfers>
     <WireTransfer>
          <Value_Date>2007-02-15</Value_Date>
          <Amount>22222.33</Amount>
          <Bank_Action>R</Bank_Action>
          <Date_Blocked_Rejected>2007-02-15</Date_Blocked_Rejected>
          <Wire_Transfer_Transaction_Type>Bank to
Bank</Wire_Transfer_Transaction_Type>
           <other elements>
     </WireTransfer>
</WireTransfers>

And then validate it against my schema? I haven't been able to get a
sample file like that to work, so perhaps I'm wrong, but it seems like
a lot to require of the customers.

Thanks for any advice,
--Jason


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.