on 03-23-2008 6:46 AM
Hi
I am using javamapping and tried to create target document by using Document class method "createElementNS". However, I failed to create the same. Can any one assist me in creation of Namespace for a xml. it's gr8 in case u provide any reference/link .
Thanks
Hi yadgiri
you may follow these links
This contain a good example of how t ocreate namespace
http://www.xml.com/pub/a/2003/03/10/python.html
http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20020409/core.html#Namespaces-Considerations
hope this may help you
Regards
Sandeep Sharma
PS: reward points if helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Check this link ...But this is using XSLT Concepts
http://www.w3schools.com/dom/met_document_createelementns.asp
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document soapDoc = db.newDocument();
Element soapEnv = soapDoc.createElementNS("http://www.w3.org/2001/12/soap-envelope","Envelope");
Element soapHeader = soapDoc.createElementNS("http://www.w3.org/2001/12/soap-envelope","Header");
soapEnv.appendChild(soapHeader);
Element soapBody = soapDoc.createElementNS("http://www.w3.org/2001/12/soap-envelope","Body");
soapEnv.appendChild(soapBody);
Element hotelBookingResponse = soapDoc.createElementNS(
"http://www.MyHotel.com/partnerservice/",
"GetSpecialDiscountedBookingForPartnersResponse");
hotelBookingResponse.appendChild(
soapDoc.createElementNS(
"http://www.MyHotel.com/partnerservice/",
"BookingDetails"));
soapBody.appendChild(hotelBookingResponse);
soapDoc.appendChild(soapEnv);
http://webservices.xml.com/2003/11/25/examples/Listing1.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.