? Creating tag for Adobe xfdf

normschaef

New member
Joined
Feb 2, 2007
Messages
4
Programming Experience
3-5
Hi all:

I'm working on an app that outputs an Acrobat xfdf (XML form data format(I think)) file. I'm using XMLTextWriter to output the file and have gotten most of the syntax correct.

The line, though that points to the .pdf into which the xml data is loaded is giving me problems.

It should read:

HTML:
Expand Collapse Copy
<f href="myPDF.pdf" />

The closest I've come is:
(XMLTextWriter dim'd as writer)
VB.NET:
Expand Collapse Copy
writer.WriteString("<f")
writer.WriteString("href=""myPDF.pdf""")
writer.WriteString("/>")
Which outputs as
< f href="myPDF.pdf" / >

Also doesn't seem to work (although it seems to me as though it should, shouldn't it?):
HTML:
Expand Collapse Copy
<f>href="myPDF.pdf"</f>

TIA for any help.
Norm
 
Last edited by a moderator:
VB.NET:
Expand Collapse Copy
writer.WriteStartElement("f")
writer.WriteAttributeString("href", "myPDF.pdf")
writer.WriteEndElement()
 
Thanks

Thanks John...
I was a little fuzzy on using the WriteAttributesString method. I thought that might be the key. Your code clears it up for me.

Thanks again.
Norm
 
Back
Top