+ Reply to Thread
Results 1 to 2 of 2

XML macro HELP!

Hybrid View

onlinetrafficteam XML macro HELP! 07-29-2014, 12:16 PM
Marc L Re: XML macro HELP! 07-29-2014, 01:01 PM
  1. #1
    Registered User
    Join Date
    06-08-2014
    Posts
    1

    XML macro HELP!

    I am trying to create a macro that would auto create XML files using a macro. The content would stay the same just need to change 1 line in the XML file. Below is one of the xml files and the URL needs to be changed from a list of 100 urls and then save the file as an xml file... Any help would be appreciated!

    <?xml version="1.0" encoding="UTF-8"?>
    <MineParams xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <StartURL>
    <url>http://www.NEEDTOCHAGETHISURL.COM/(GETS ALL THE DATA FROM A LIST OF URLS)</url>
    </StartURL>
    <FieldList>
    <DATAFIELD>
    <type>Text</type>
    <name>Company</name>
    <xpath>HTML[0][ie9 ie js]\BODY[1][country-us logged-out ytype jquery]\DIV[1][lang-en]\DIV[4][ ]\DIV[2][container indexed-biz-archive]\DIV[2][clearfix layout-block layout-a scroll-map-container search-results-block]\DIV[0][column column-alpha ]\DIV[0][results-wrapper]\DIV[0][content]\UL[0][ylist ylist-bordered search-results]\LI[1][ ]\DIV[0][search-result natural-search-result biz-listing-large]\DIV[0][media-block clearfix media-block-large main-attributes]\DIV[1][media-story]\H3[0][search-result-title]\SPAN[0][indexed-biz-name]\A[0][biz-name]\</xpath>
    <pattern>true</pattern>
    <regex />
    </DATAFIELD>
    <DATAFIELD>
    <type>Text</type>
    <name>address</name>
    <xpath>HTML[0][ie9 ie js]\BODY[1][country-us logged-out ytype jquery]\DIV[1][lang-en]\DIV[4][ ]\DIV[2][container indexed-biz-archive]\DIV[2][clearfix layout-block layout-a scroll-map-container search-results-block]\DIV[0][column column-alpha ]\DIV[0][results-wrapper]\DIV[0][content]\UL[0][ylist ylist-bordered search-results]\LI[1][ ]\DIV[0][search-result natural-search-result biz-listing-large]\DIV[1][secondary-attributes]\DIV[0][service-area]\</xpath>
    <pattern>true</pattern>
    <regex />
    </DATAFIELD>
    <DATAFIELD>
    <type>Text</type>
    <name>phone</name>
    <xpath>HTML[0][ie9 ie js]\BODY[1][country-us logged-out ytype jquery]\DIV[1][lang-en]\DIV[4][ ]\DIV[2][container indexed-biz-archive]\DIV[2][clearfix layout-block layout-a scroll-map-container search-results-block]\DIV[0][column column-alpha ]\DIV[0][results-wrapper]\DIV[0][content]\UL[0][ylist ylist-bordered search-results]\LI[1][ ]\DIV[0][search-result natural-search-result biz-listing-large]\DIV[1][secondary-attributes]\SPAN[2][biz-phone]\</xpath>
    <pattern>true</pattern>
    <regex />
    </DATAFIELD>
    <DATAFIELD>
    <type>Link_NextPage</type>
    <name> → </name>
    <xpath>HTML[0][ie9 ie js]\BODY[1][country-us logged-out ytype jquery]\DIV[1][lang-en]\DIV[4][ ]\DIV[2][container indexed-biz-archive]\DIV[2][clearfix layout-block layout-a scroll-map-container search-results-block]\DIV[0][column column-alpha ]\DIV[0][results-wrapper]\DIV[0][content]\DIV[1][search-pagination]\DIV[0][pagination-block clearfix]\UL[1][pagination-links]\LI[9][ ]\A[0][page-option prev-next]\</xpath>
    <pattern>true</pattern>
    <regex />
    </DATAFIELD>
    </FieldList>
    <CategoryList />
    <KeywordList />
    </MineParams>

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Lightbulb Re: XML macro HELP!


    If it's always the same line number to update, just read source file as a text file
    and update the line and write destination file !

    Just read inner VBA help of Line Input # and Print # statements, beginner level …
    Last edited by Marc L; 07-29-2014 at 01:04 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Macro to show Which macro didnt work in a nested macro
    By akhileshgs in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-10-2013, 03:21 AM
  2. Perform macro "on open" specific file- store macro in Personal Macro Workbook?
    By thompssc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-17-2012, 12:38 PM
  3. lookup macro, solver macro, realtime macro
    By xelhelp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-02-2011, 06:14 PM
  4. Cannot find macro error when running a macro from a macro in a diffrent workbook.
    By Acrobatic82 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2010, 09:22 AM
  5. [SOLVED] Macro calling another Macro: "The macro 'Personal.xls!FindChar"
    By William Benson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2005, 09:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1