I need to write a little vb.net app that looks at XML files and
manipulates text in them. Here is what I need to do and I have NO idea
how to do something like this.
here is an example file: also can be found at: http://www.keepitsimplekid.com/xml/Ad00304.xml
<XMD-entity ENTITY_TYPE="Ad " PAGE_NO="3" ID="Ad00304" BOX="450 1030
1229 1429" LANGUAGE="Engli sh" SNP="Ad00304S.j pg" SNP_WIDTH="156"
SNP_HEIGHT="80" >
<Meta NAME="Untitled Ad" DESCRIPTION="" SUBTYPE="" BASE_HREF="ETN/
2007/05/02" SOURCE_TYPE="PD F" PUBLICATION="ET N" SECTION="Up Close"
ISSUE_DATE="02/05/2007" WORDCNT="140" RELEASE_NO="05-02_Complete"
PAGE_ID="sectio n1page3" PAGE_TYPE="Sing le" PAGE_WIDTH="515 "
PAGE_HEIGHT="91 9" DEFAULT_IMG_EXT ="png"
PDF_DESTINATION _MAPPED="OLV0_E ntity_0003_0001 " IMAGES_RESOLUTI ON="100"
XMD_VER="2.6.20 9" PAGE_LABEL="3A"/>
<Link SOURCE="05-02_Complete.pdf " FIRST_ID="Ar003 00" LAST_ID="Pc0030 6"
NEXT_ID="Ad0030 5" PREV_ID="Ad0030 3" TOC_ID="C:/Olive/Repository/ETN/
2007/05/02/TOC.xml"/>
−
<Application_Da ta AD_NUMBER="1" PUB_DATE="1" ETS_ADVERTISER= "1"
CATEGORY="1" AD_WIDTH="1" AD_HEIGHT="1" PAGE_NUMBER="1"
SECTION_NAME="1 " SECTION_PAGE_NU MBER="1" PDF_NAME="1" AD_X="1"
AD_Y="1" WEBSITE="1" EMAIL="1" UPSOLD="1">
−
<Application_In fo AI_TYPE="AD_NUM BER">
<Ai_Item NAME="1515578"/>
</Application_Inf o>
−
<Application_In fo AI_TYPE="PUB_DA TE">
<Ai_Item NAME="05/02/07"/>
</Application_Inf o>
−
<Application_In fo AI_TYPE="ETS_AD VERTISER">
<Ai_Item NAME="LEAF GUARD OF LAKE ERIE"/>
</Application_Inf o>
I have Bolded what I am working with. At the top of the xml where it
says Untitled Ad I want to replace that text with whatever is in the
NAME of the ETS Advertiser, in this case LEAF GUARD OF ERIE
And I want to make the change and save the changes. I then want to be
able to loop through all .xml files in the directory and do this text
swap. Not all xml files will have the same advertiser name, they all
have different ones.
How would I build a program to do this?