| Author |
How to change XML Beans Namespace
|
Brad Ko
Greenhorn
Joined: Jul 27, 2007
Posts: 10
|
|
Does anyone know what methods I can use to remove and redefine the default namespace? I'm using xmlbeans(v2.2.0). For our project, I want to redefine the namespace on the orignal xml to look like the target xml (see XML examples below). =====Orignal XML===== <ClientData xmlns="http://www.company.com"> <customerInformation> <accessCard> <accessCardNumber>45xxxxxxxxxx99</accessCardNumber> </accessCard> </customerInformation> <w3:Info xmlns="http://company.org/schemas" xmlns:w3="http://www.company.com"> <w3:Count>6</w3:Count> <w3:AddDataFlag>N</w3:AddDataFlag> <w3:VendorList> <w3:PayeeID>00001</w3:PayeeID> <w3:PayeeTkn>###123456</w3:PayeeTkn> <w3:PayeeName>AAAAAAA</w3:PayeeName> <w3:CustPayeeID>00000</w3:CustPayeeID> <w3:PayeeDataType/> <w3:PayeeData/> </w3:VendorList> </w3:Info> </ClientData> ====Target XML===== <ClientData xmlns="http://www.company.com"> <customerInformation> <accessCard> <accessCardNumber>45xxxxxxxxxx99</accessCardNumber> </accessCard> </customerInformation> <Info> <Count>6</Count> <AddDataFlag>N</AddDataFlag> <VendorList> <PayeeID>00001</PayeeID> <PayeeTkn>###123456</PayeeTkn> <PayeeName>AAAAAAA</PayeeName> <CustPayeeID>00000</CustPayeeID> <PayeeDataType/> <PayeeData/> </VendorList> </Info> </ClientData> Thanks in advance.
|
 |
Brad Ko
Greenhorn
Joined: Jul 27, 2007
Posts: 10
|
|
Nobody can answer for this question?
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
|
If I wanted to transform your original XML into your target XML, I would just use XSLT to do that. Should be pretty simple. But you said you were using XML Beans, and I know nothing about that, so I didn't answer.
|
 |
 |
|
|
subject: How to change XML Beans Namespace
|
|
|