Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within XML
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
XML and Related Technologies
How to change XML Beans Namespace
Brad Ko
Greenhorn
Posts: 10
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
Posts: 10
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Nobody can answer for this question?
Paul Clapham
Marshal
Posts: 28193
95
I like...
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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.
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Differences between targetNamespace and default namespace
XML name space problem
JAXB and XML default namespace issue.
xmlbeans namespace issue
DOM String output is not the same as original XML
More...