473,695 Members | 1,890 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XPath Editor (Updated!)

Hi All,

I have updated my XPath Generator software: XPath Studio .NET.

( http://www.ziggyware.com/downloads.php?cat_id=2 )

Easily select nodes from an xml file to generate XPath statements

Insert node values to narrow down XPath results

Insert by node value ornode existance

Multi-threaded framework to prevent stalls in the application when
working with large XML data files

Quick and easy to use interface is easy to use for novices

Resulting XPath query conforms to XPath 1.0 standards

View the Help Article for information relating to XPath Studio .NET
( http://www.ziggyware.com/articles.php?cat_id=1 )

Questions? Ask them on the XPath Studio .NET Forums
( http://www.ziggyware.com/forum/viewforum.php?forum_id=3 )

Thanks,
Michael "Ziggy" Morton

http://www.ziggyware.com

Aug 24 '06 #1
3 3246
Nice tool!

I am looking for something that will do the reverse. I have a whole bunch
of XPath statements and I need to use them to generate and populate an XML
document. I have maping file that maps my data to a specific XPath. For
example:

Field# XPath
1 /LOAN/_APPLICATION/ASSET/@_Type
2
/LOAN/_APPLICATION/RESPA_FEE/_PAYMENT/@_IncludedInAPR Indicator

etc.

Do I have to parse every line myself or is there a .NET class that will do
this for me?
Aug 29 '06 #2
"Yossi" <jo**********@f irstfi.comwrote in message
news:u2******** ******@TK2MSFTN GP04.phx.gbl...
Nice tool!

I am looking for something that will do the reverse. I have a whole bunch
of XPath statements and I need to use them to generate and populate an XML
document. I have maping file that maps my data to a specific XPath. For
example:

Field# XPath
1 /LOAN/_APPLICATION/ASSET/@_Type
2 /LOAN/_APPLICATION/RESPA_FEE/_PAYMENT/@_IncludedInAPR Indicator

etc.

Do I have to parse every line myself or is there a .NET class that will do
this for me?
I think you're on your own.

I've never heard of a requirement like this. Instead of working against the
XPath, could you work from a schema?

Note that XPath, in general, is ambiguous. I hope that the XPath you're
being provided is restricted in helpful ways, like, no "//" or other
wildcards, no "..", no functions, etc. XPath isn't really good for
describing the structure of an XML document.

John
Aug 29 '06 #3

I though so....

I was hoping to find a function such as CreateAttribute (string XPath, string
data). For example:

CreateAttribute ("/LOAN/_APPLICATION/ASSET/@_Type","Automo bile") would create
the attribute and all needed parents if they don't exist:

<LOAN>
<_APPLICATION >
<ASSET _Type="Automobi le">
</ASSET>
</_APPLICATION>
</LOAN>

If later on in the code I have this statement:
CreateAttribute ("/LOAN/_APPLICATION/DOWN_PAYMENT/@_Type","CashOn Hand"), it
will modify the above XML doc to:

<LOAN>
<_APPLICATION >
<ASSET _Type="Automobi le">
</ASSET>
<DOWN_PAYMENT _Type="CashOnHa nd">
</DOWN_PAYMENT>
</_APPLICATION>
</LOAN>

In this following case, the function has to be smart enough to realize that
<ASSETalready has a _Type attribute, so it should create a new <ASSET>
element:
CreateAttribute ("/LOAN/_APPLICATION/ASSET/@_Type","Automo bile")

<LOAN>
<_APPLICATION >
<ASSET _Type="Automobi le">
</ASSET>
<ASSET _Type="Automobi le">
</ASSET>
<DOWN_PAYMENT _Type="CashOnHa nd">
</DOWN_PAYMENT>
</_APPLICATION>
</LOAN>

The tricky part now is to add nodes to an existing ASSET. I guess that
since both nodes look the same, we can add a node to either one:
CreateAttribute ("/LOAN/_APPLICATION/ASSET/@_Type=\"Automo bile\"/DESCRIPTION/@_Make","BMW")

<LOAN>
<_APPLICATION >
<ASSET _Type="Automobi le">
<DESCRIPTION _Make="BMW">
</DESCRIPTION>
</ASSET>
<ASSET _Type="Automobi le">
</ASSET>
<DOWN_PAYMENT _Type="CashOnHa nd">
</DOWN_PAYMENT>
</_APPLICATION>
</LOAN>

What abaout the year?
CreateAttribute ("/LOAN/_APPLICATION/ASSET/@_Type=\"Automo bile\"/DESCRIPTION/@_Make=\"BMW\"/@_Year","2006")

<LOAN>
<_APPLICATION >
<ASSET _Type="Automobi le">
<DESCRIPTION _Make="BMW" _Year="2006">
</DESCRIPTION>
</ASSET>
<ASSET _Type="Automobi le">
</ASSET>
<DOWN_PAYMENT _Type="CashOnHa nd">
</DOWN_PAYMENT>
</_APPLICATION>
</LOAN>

So I need to use String.Split() and walk the resulting array. I'll split at
'\'. I think I can use XPath to find an embeded node (i.e. ASSET inside
_APPLICATION inside LOAN). The thing is that I need to find the correct
ASSET node and the only thing that will differentiate them is what's on the
inside. Oh brother! This is going to be fun....

Any suggestions?
"John Saunders" <john.saunder s at trizetto.comwro te in message
news:OM******** ******@TK2MSFTN GP04.phx.gbl...
"Yossi" <jo**********@f irstfi.comwrote in message
news:u2******** ******@TK2MSFTN GP04.phx.gbl...
>Nice tool!

I am looking for something that will do the reverse. I have a whole
bunch of XPath statements and I need to use them to generate and populate
an XML document. I have maping file that maps my data to a specific
XPath. For example:

Field# XPath
1 /LOAN/_APPLICATION/ASSET/@_Type
2 /LOAN/_APPLICATION/RESPA_FEE/_PAYMENT/@_IncludedInAPR Indicator

etc.

Do I have to parse every line myself or is there a .NET class that will
do this for me?

I think you're on your own.

I've never heard of a requirement like this. Instead of working against
the XPath, could you work from a schema?

Note that XPath, in general, is ambiguous. I hope that the XPath you're
being provided is restricted in helpful ways, like, no "//" or other
wildcards, no "..", no functions, etc. XPath isn't really good for
describing the structure of an XML document.

John


Aug 29 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
4386
by: Mike Kamermans | last post by:
I hope someone can help me, because what I'm going through at the moment trying to edit XML documents is enough to make me want to never edit XML again. I'm looking for an XML editor that has a few features that you'd expect in any editor, except nearly none of them seem to have: 1 - Search and repalce with Regular Expressions. 2 - Search and Replace in an Xpath context. 3 - User specified tag-generation for either on a...
6
8300
by: Scott Simpson | last post by:
What is a good tool for running XPath queries on Linux? I have the O'Reilly XPath book and I'm using XPath Visualizer on Windows and that seems to work fine, but I'm looking for something on Linux. I've tried Quanta. It seems to be able to run the xsltproc processor to do XSLT transformations but it doesn't seem to cope with interactively typing in XPath expressions. (As a side note, what other tools are useful with XML on Linux and...
2
2879
by: ree32 | last post by:
When I import an xml document in Visual studio and Genereate as schema from it, and create a dataset from it, it adds this line into to the root element of my xml file - "xmlns="http://tempuri.org/nameOfRoot.xsd" I have no idea what its pointing to & what is tempuri.org? So when this tag is in my xml tag my xpath query never works. But when I delete it work fine.
1
6715
by: Robert Sander | last post by:
Hi, I have to do some case-insensitive queries on a XML document using XPath. Because XML 1.0 and XPath 1.0 are case-sensitive this is a little bit tricky. Sample document: <books> <book>…</book> <Book>…</Book>
0
1291
by: Olivier Ishacian | last post by:
XMLmind XML Editor V3.0 Patch 1 can be downloaded from http://www.xmlmind.com/xmleditor/download.shtml _____________________________________________ V3.0 Patch 1 (December 2, 2005) Enhancements: ~~~~~~~~~~~~~
4
1577
by: Jethro | last post by:
I've tried to find the simplest demonstration of my issue. I have source XML that looks like this (not a real XSD schema, but it doesn't matter at this point): (in var xmlStr:) <xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema">abab</xsd:element> Essentially, it's just an xml node w/ an xsd prefix, and the namespace defined right on the node. Then, some jibberish is the text of the
14
2000
by: Mat| | last post by:
Hello :-) I am learning XPath, and I am trying to get child nodes of a node whose names do *not* match a given string, e.g : <dummy> <example> <title>Example 1</title> <body>this is an example</body>
4
12761
by: Claudio Calboni | last post by:
Hello folks, I'm having some performance issues with the client-side part of my application. Basically, it renders a huge HTML table (about 20'000 cells in my testing scenario), without content. Content is "pushed" from the back via some JS, for the only displayed portion of table. Once the user scrolls, JS updates visible cells with data. It's quite the philosophy behind GMaps and similars. So, the server says to JS "update this group...
5
50576
by: jorgedelgadolopez | last post by:
Hi all, I am using the xpathnavigator evaluate function on .net (xpath 1 right?). Now I need to expand the code to do multiple contains, compare dates (such as 'before', 'between' and 'after'), and so on. This is the thought: //person
0
8590
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9005
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8869
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8845
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7693
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5848
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3025
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2304
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1988
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.