Using InfoPath, the xml saved has a weird prolog-can I supress it

A

acs-lanoue

I would like to supress the xml preamble generted when storing an infopath
document. How do I do that so that I don't have to edit and delete the
preamble? It looks like this:
<?mso-infoPathSolution solutionVersion="1.0.0.25" productVersion="12.0.0"
PIVersion="1.0.0.0"
href="file:///C:\Documents%20and%20Settings\DLaNoue\My%20Documents\My%20Downloads\FusionCharts_2_3_Dvlpr\SampleCode\MultiSeries\SimpleChart\MultiSeriesTemplate.xsn"
name="urn:schemas-microsoft-com:eek:ffice:infopath:MultiSeriesTemplate:" ?>
<?mso-application progid="InfoPath.Document"
versionProgid="InfoPath.Document.2"?>
 
L

Larry Spencer

If the user selects File / Export To / Web, InfoPath will generate an
HTML file that contains no InfoPath "preamble." Of course, you'll get
a web form (<html>, etc.) instead. Is that a good thing or a bad thing
in your situation?

If it's a bad thing, please explain more about why you want to suppress
those processing instructions. Even if we can't do exactly that, maybe
we can meet your needs in some other way.

BTW, you can control just how the user is able to save or export the
form with Tools / Form Options / Open and Save.
 
A

acs-lanoue

Thank you for the response... but it's not the one I was looking/hoping for.
I am using infopath as a user interface to generate xml data files for use by
FusionCharts (http://www.infosoftglobal.com/FusionCharts/). It's perfect in
every way, except the charts don't recognize the preamble and flag the file
as invalid xml.

I have been looking for ways to generate xml from excel, waited for office12
version b/c I was told excel12 could handle multi-series elements... but
alas, it's not true. Infopath is the only app so far that effortlessley
imports an existing data.xml file, creates the style and maps for the data...
allows me, or any novice user, to fill out the form, save it and voila!! All
the xml is correct except for the preamble. I can use excel for simple
charts and graphs, but prefer a single tool for end users.

Not only that, but some of the output from infopath is mixed in with the
active xml. I use frontpage to format the xml, which automatically arranges
the code makingit easier to located and delete the offending lines.

I am not a coder, so I can't write a script to automatically parse and
delete the offending strings... what to do? I was so excited about infopath
since I just discovered it about three days ago in my quest for a form-driven
xml generator.

I looked at word12, but had no luck.

Any other suggestions?
 
L

Larry Spencer

Any other suggestions?

You said you are not a coder, so you couldn't write anything to parse
and delete the offending strings. However, might there be someone else
in your company who could do this? If not, could you get a freelancer
to do it -- perhaps by posting on a site like Elance.com? The code
would not have to be in InfoPath; the string-stripper could be a
stand-alone program or Windows service.

For that matter, there's probably freeware out there to do this kind of
thing already. What you want is a regular-expression processor. Such
programs can search for a pattern of characters (the "regular
expression") and replace it with something else (an empty string, in
your case). The trick would be to find a program that can run all the
time, in the background, so it can continually fix new files as they
arrive.

Sorry I can't think of anything more elegant than that. Good luck.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top