Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML DOM in ASP + namespace issue

Status
Not open for further replies.

ChainsawJoe

Programmer
Dec 5, 2000
154
GB
(i realise this might be an ASP forum issue, so excuse the cross-posting)

I have the following XML (or very similar). I'm using MSXML2.DOMDocument.4.0 in ASP (will be converted to vbscript for a job), and selectNodes("//image") returns nothing - unless I delete the namespace declaration in the egcml element. I can't do this, since I'm getting the XML as a remote feed.

How can I use MSXML2.DOMDocument.4.0 and perhaps specify the namespace in such a way that selectNodes("//image") returns all of the image nodes?

Code:
<?xml version="1.0"?>
<egcml xmlns="[URL unfurl="true"]http://www.mysite.net/egcml">[/URL]
	<article type="review" name="r_virtuatennis_psp" id="60726">
		<assets group="System" preview-size-hint-width="260"><image asset-id="-frontpage-feature" type="screenshot" format="1" href="assets/articles/a60726/F_VT.jpg" thumbnail-href="assets/articles/a60726/a_med_F_VT.jpg" preview-href="assets/articles/a60726/ss_preview_F_VT.jpg" original-width="60" original-height="90" alt="'Virtua Tennis: World Tour' Screenshot -frontpage-feature"/>
			<image asset-id="-frontpage-headline-large" type="screenshot" format="1" href="assets/articles/a60726/L_VT.jpg" thumbnail-href="assets/articles/a60726/a_med_L_VT.jpg" preview-href="assets/articles/a60726/ss_preview_L_VT.jpg" original-width="300" original-height="108" alt="'Virtua Tennis: World Tour' Screenshot -frontpage-headline-large"/>
			<image asset-id="-frontpage-headline-small" type="screenshot" format="1" href="assets/articles/a60726/S_VT.jpg" thumbnail-href="assets/articles/a60726/a_med_S_VT.jpg" preview-href="assets/articles/a60726/ss_preview_S_VT.jpg" original-width="148" original-height="83" alt="'Virtua Tennis: World Tour' Screenshot -frontpage-headline-small"/>
		</assets>
		<assets group="article" preview-size-hint-width="260"><image asset-id="3" type="screenshot" format="1" href="assets/articles/a60726/3.jpg" thumbnail-href="assets/articles/a60726/a_med_3.jpg" preview-href="assets/articles/a60726/ss_preview_3.jpg" original-width="480" original-height="272" alt="'Virtua Tennis: World Tour' Screenshot 3"/>
			<image asset-id="4" type="screenshot" format="1" href="assets/articles/a60726/4.jpg" thumbnail-href="assets/articles/a60726/a_med_4.jpg" preview-href="assets/articles/a60726/ss_preview_4.jpg" original-width="480" original-height="272" alt="'Virtua Tennis: World Tour' Screenshot 4"/>
			<image asset-id="1" type="screenshot" format="1" href="assets/articles/a60726/1.jpg" thumbnail-href="assets/articles/a60726/a_med_1.jpg" preview-href="assets/articles/a60726/ss_preview_1.jpg" original-width="480" original-height="272" alt="'Virtua Tennis: World Tour' Screenshot 1"/>
			<image asset-id="2" type="screenshot" format="1" href="assets/articles/a60726/2.jpg" thumbnail-href="assets/articles/a60726/a_med_2.jpg" preview-href="assets/articles/a60726/ss_preview_2.jpg" original-width="480" original-height="272" alt="'Virtua Tennis: World Tour' Screenshot 2"/>
		</assets>
	</article>
</egcml>

Muchos TIA,

CJ

--------------------------------------------------
- better than toast.
Penguins - better than --------------------------------------------------
 
Ignore me - I just changed the code to use MSXML2.DOMDocument instead of MSXML2.DOMDocument.4.0 and everything's fine... d'oh!

--------------------------------------------------
- better than toast.
Penguins - better than --------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top