0 votes
1 view
in Salesforce by (11.9k points)

I'm trying to use xmllint to reformat our VisualForce code. My command line is "xmllint --format --recover filename.page".

Though the formatting (especially script sections) work out well, all the tags with apex inside them are modified to eliminate "apex."

For instance, "apex:page" is replaced with "page.". Obviously, this makes the reformatting useless.

While processing, xmllint complains about the namespace. In the example below I just use the namespace "ns." Notice how the output removes the "ns."

[email protected]:~/tmp$ xmllint --format --recover a.xml

a.xml:1: namespace error : Namespace prefix ns on a is not defined



<?xml version="1.0"?>



1 Answer

0 votes
by (30.1k points)

To add to the answer that collapsar made, here are some of the namespaces that are used in Salesforce's Enterprise WSDL. Might be a good idea to start with these, or take a look at the other WSDLs they have published. (See http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_partner.htm for more details.)




Edit: Just took a look at the metadata for our Apex classes and found this namespace, which might be useful:


Welcome to Intellipaat Community. Get your technical queries answered by top developers !