jeudi 27 mars 2014

Any XML champs here?

I'm in the middle of trying on new hats here at work, and one thing is clear.



I don't have a programmer's brain! Grrr....



I was tasked with creating an XML file in order to better grease the wheels of billing. I need to use our program (PlanetPress) to strip out the address block and put the lines in an XML file. I've managed to create find somewhere on the internet that did that:




Quote:








Set MyMeta = CreateObject("MetadataLib.MetaFile")

MyMeta.LoadFromFile Watch.GetMetadataFileName

MyMeta.Export "C:\Users\me\Desktop\PDF2XML\OUT\MetadataTest.xml" ,0



Unfortunately, this creates a slew of fields we just don't care about. The Dimensions of the PDF, what printer it's going on, finishing options, etc...



In an effort to trim this down into something manageable, I'm looking at the XML file and trying to figure out what is what:




Quote:











<?xml version="1.0" encoding="utf-8" ?>

- <ol:Jo Version="2.1" xmlns: ol="olmeta2" xmlns:xs="http://ift.tt/1fow1qx;

<ol :At />

<ol :Fi />

- <ol :Gr Selected="true">

<ol:At />
<ol:Fi />

- <ol: Do Selected="true">

- <ol:At>

<TemplateName>PDF2XML</TemplateName>

<DataFile>C:\ProgramData\Objectif Lune\PlanetPress Suite 7\PlanetPress Watch\Debug\debug25890D1F.dat</DataFile>

<Time>14:28:10-04:00</Time>

<Date>2014-03-27</Date>

<Producer>PlanetPress Suite</Producer>

<Creator>PlanetPress Design</Creator>

<TargetDevice>Fiery </TargetDevice>

<DataEncoding>MS-CP-1252</DataEncoding>

<EFRIPBooklet>TwoUp</EFRIPBooklet>

</ol:At>

- <ol:Fi>

<mdCity>BOYNTON BEACH</mdCity>

<mdState>FL</mdState>

<mdZip>33435</mdZip>

</ol:Fi>

- <ol: Da Selected="true" Offset="0" RealIndex="0">

- <ol:At>

<ol__internalname_offset>0</ol__internalname_offset>

<ol__internalname_realindex>0</ol__internalname_realindex>

</ol:At>

- <ol:Fi>

<Name>Name</Name>

<Address1>22 Main Street</Address1>

<Address2>#312</Address2>

<Address3>BOYNTON BEACH, FL 33435</Address3>

<Address4 />

</ol:Fi>

- <ol:Pa>

- <ol:At>

<Dimensions>612:792</Dimensions>

<Orientation>Rotate0</Orientation>

<MediaColor />

<Weight />

<MediaType />

<Side>Front</Side>

<Duplex />

<InputSlot />

<OutputBin />

<Jog />

<Staple />

</ol:At>

<ol:Fi />

</ol: Pa>

- <ol: Pa>

- <ol:At>

<Orientation>Rotate0</Orientation>

<Dimensions>612:792</Dimensions>

<Weight />

<MediaColor />

<MediaType />

<EFRIPBooklet>TwoUp</EFRIPBooklet>

<Side>Front</Side>

<Duplex />

<InputSlot />

<OutputBin />

<Jog />

<Staple />

</ol:At>

<ol:Fi />

</ol: Pa>

</ol: Da>

</ol: Do>

- <ol: Do Selected="true">

- <ol:At>






Questions -

1 I know that ol in HTML is "ordered list" and given the appearance of the XML file I'm sure that's what it means here. But what does the :At and :Fi and others mean? I'm just trying to understand it a bit more.



2 Is there a way to strip out all that extraneous mumbo-jumbo? The media types, the finishing, etc... and just leave the address? (Pay no mind to the extra address in the sample, as it's me playing around trying to figure stuff out)





super thanks for any help!





via JREF Forum http://ift.tt/1fow3ip

Aucun commentaire:

Enregistrer un commentaire