Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Building XML Doc using Xerces (Namespace problem)

Status
Not open for further replies.

ChrisMcD

Programmer
Nov 8, 2001
5
GB
Hi,

I'm trying to build an xml document using the Xerces api, I have managed to insert a processing instruction, elements, nodes etc... but I'm having trouble adding a namespace.

Here is some of my code so far,

pDocument.appendChild(pDocument.createProcessingInstruction("xml-stylesheet", "type=\"text/xsl\" href=\"../xsl/searchperson.xsl\""));

Element root = (Element) pDocument.createElement("details");
pDocument.appendChild(root);

Element title = pDocument.createElement("title");
root.appendChild( title );

Element firstName = pDocument.createElement("firstname");
root.appendChild( firstName );

Anybody got any ideas,

Chris
 
tags like <tag 1> is invalid.
perhaps you can direct this question to the XML forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top