Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6472469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:20:54+00:00 2026-05-25T06:20:54+00:00

I am including HTML pages in an iPad magazine app using WebView (Woodwing Reader

  • 0

I am including HTML pages in an iPad magazine app using WebView (Woodwing Reader app). All files for the HTML pages are bundled with the app.

The root directory of the app contains a folder [images] which, contains a subdirectories of folders for each page in the app (i.e [page1], [page2], [page3], etc.). Also in the root directory is the main XML file which maps the layout structure of the pages.

I am attempting to build an HTML page that reads the [magazine.xml] and shares content via Twitter, FB, etc. I am able to parse the data from [magazine.xml] to an external web page (which will be used for a sharing URL), but the problem is that the external web page is not able to recognize which magazine issue date to share. As each issue has the same naming convention for the XML file [magazine.xml].

I can manually insert the issue date on my sharing app via javascript, but I would much rather make this an automated process. The XML file has a tag [issuedate] that lists the publication date, so I am attempting to read this tag via javascript and insert it into a URL string…but so far, no success.

Below is a sample of my javascript:

var issue = '08-27-2011';

$(function() {
var src = 'http://www.example.com/sections/ipad/'+section+'/?issue='+issue;
$('<iframe " src="' + src + '" width="100%" height="100%" scrolling="auto" frameborder="0"><\/iframe>').appendTo('#iframe');
});

And here is sample of the XML structure:

<?xml version="1.0" encoding="UTF-8"?>
<issue domversion="1.0">
<issuedate>08-19-2011</issuedate>
<items>
<item>
  <id>111</id>
  <category>Story Category</category>
  <title>Story Title</title>
  <description>Description</description>
  <author/>
  <pages>
    <page>
      <horizontalpage>
        <objects>
          <object>
            <id>000111222.1</id>
            <type>webview</type>
            <x>0</x>
            <y>0</y>
            <width>1024</width>
            <height>768</height>
            <link>bundle://images/111/PageID/PageID.html</link>
          </object>
        </objects>
        <pthumb>images/111/PageID_Thumbnail_h.jpg</pthumb>
        <ppreview>images/111/PageID_Preview_h.jpg</ppreview>
      </horizontalpage>
      <verticalpage>
        <objects>
          <object>
            <id>000111222a.1</id>
            <type>activeelement</type>
            <x>0</x>
            <y>0</y>
            <width>768</width>
            <height>1024</height>
            <link>bundle://images/111/PageID/PageID.html</link>
          </object>
        </objects>
         <pthumb>images/111/PageID_Thumbnail_v.jpg</pthumb>
        <ppreview>images/111/PageID_Preview_v.jpg</ppreview>
      </verticalpage>
    </page>

As I mentioned before I would much rather automate the process of gathering the issue var. I attempted to do this with the following code, but to no avail:

 xmlDoc=loadXMLDoc("../../magazine.xml");
 var issue = xmlDoc.getElementsByTagName("issuedate");

$(function() {
var src = 'http://www.example.com/sections/ipad/'+section+'/?issue='+issue;
$('<iframe " src="' + src + '" width="100%" height="100%" scrolling="auto" frameborder="0"><\/iframe>').appendTo('#iframe');
});

As you can see, the XML file resides two directories up from the directory that holds the javascript file. I can’t figure out how to make this work…your help will be much appreciated.

Thanks,
Carlos

——————————————————————————————>

UPDATE:

I figured it out, with the help of a friend from work. The solution was actually easier than I thought! I simply placed my HTML pages in the root directory of the app and called the XML file with the following code:

$(function() {
var issue;
$.ajax({
    async: false,
    type: "GET",
    url: "magazine.xml",
    dataType: "xml",
    success: function(xml) {
        issue = $(xml).find('issuedate').text();
    }
});
var src = 'http://www.example.com/ipad/'+section+'/?issue='+issue;
$('<iframe " src="' + src + '" width="100%" height="100%" scrolling="auto" frameborder="0"><\/iframe>').appendTo('#iframe');
});

As you can see, I was able to pass the ‘issue’ variable into the URL as well.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:20:54+00:00Added an answer on May 25, 2026 at 6:20 am

    I actually answered my own question (with the help of a co-worker), so here it is:

    $(function() {
    var issue;
    $.ajax({
    async: false,
    type: "GET",
    url: "magazine.xml",
    dataType: "xml",
    success: function(xml) {
        issue = $(xml).find('issuedate').text();
    }
    });
    var src = 'http://www.example.com/ipad/'+section+'/?issue='+issue;
    $('<iframe " src="' + src + '" width="100%" height="100%" scrolling="auto" frameborder="0"><\/iframe>').appendTo('#iframe');
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been using jquery 1.3.2 to pull snippets of html (including script) from a
I've a web app served by Apache, html pages sent to browsers include several
method is the most efficient when translating bunches of text/web pages including HTML? I
We have an offline set of HTML pages we're working with using HTML5 document
I have a var that contains a full html page, including the head, html,
I'm writing standards compliant XHTML Strict 1.0, so including the HTML target attribute on
ok simple question about including large mostly static html and asp.net code I am
Has anyone created HTML microformats for video and video overlays including: Video File Links
I want to take html, including the text and images and turn it into
Let's say I'm including a file which contains html. The html have characters as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.